'Returns a set of all models represented by the provided list of table names.'

def installed_models(self, tables):

    from django.db import models, router
    all_models = []
    for app in models.get_apps():
        for model in models.get_models(app):
            if router.allow_syncdb(self.connection.alias, model):
                all_models.append(model)
    tables = list(map(self.table_name_converter, tables))
    return set([m for m in all_models if (self.table_name_converter(m._meta.db_table) in tables)])
