@classmethod
    def _factory(cls, lookup, synchronize_session, *arg):
        try:
            klass = lookup[synchronize_session]
        except __HOLE__:
            raise sa_exc.ArgumentError(
                "Valid strategies for session synchronization "
                "are %s" % (", ".join(sorted(repr(x)
                                             for x in lookup))))
        else:
            return klass(*arg)
dataset/ETHPy150Open RoseOu/flasky/venv/lib/python2.7/site-packages/sqlalchemy/orm/persistence.py/BulkUD._factory