def get_metadata(self):
    for table in models_metadef.BASE_DICT.metadata.sorted_tables:
        models.BASE.metadata._add_table(table.name, table.schema, table)
    return models.BASE.metadata
def get_metadata(self):
    for table in models_metadef.BASE_DICT.metadata.sorted_tables:
        models.BASE.metadata._add_table(table.name, table.schema, table)
    return models.BASE.metadata