def METHOD_NAME(session):
    result = list(
        session.execute(
            text(
                """
        SELECT type, name, tbl_name, sql
        FROM sqlite_master
        ORDER BY type, name, tbl_name
        """
            )
        )
    )
    return {(x[0], x[1], x[2]): x[3] for x in result}