def statement(engine, query):
    """ Statement compiler for a given SQLAlchemy engine + query.

        Arguments:
            engine (sqlalchemy.engine.Engine):  SQLAlchemy connection engine
            query  (sqlalchemy.orm.Query):      SQLAlchemy query

        Returns:
            Compiled engine-specific statement. """
    stmt = query.statement.compile(engine)
    return stmt