def METHOD_NAME(engine, query: str, schema: Optional[str] = None, **kwargs):
    # Pandas' `read_sql_table/query` because they has type inference via SQLAlchemy
    # (from the datatypes in the query that postgres gives back).
    if schema:
        query = (
            SQL("SET search_path TO {},public;")
            .format(Identifier(schema))
            .as_string(engine.connection)
            + query
        )
    return pd.read_sql_query(sql=query, con=_get_sqlalchemy_engine(engine), **kwargs)