def get_maker(autocommit=True, expire_on_commit=False):
 'May assign __MAKER if not already assigned'
 global _MAKER, _ENGINE
 assert _ENGINE
 if (not _MAKER):
  _MAKER = sa_orm.sessionmaker(bind=_ENGINE, autocommit=autocommit, expire_on_commit=expire_on_commit)
 return _MAKER

def get_maker ( autocommit = True , expire_on_commit = False ) : global _MAKER , _ENGINE assert _ENGINE if ( not _MAKER ) : _MAKER = sa_orm . sessionmaker ( bind = _ENGINE , autocommit = autocommit , expire_on_commit = expire_on_commit ) return _MAKER
return a sqlalchemy sessionmaker using the given engine .