Call me before using any of the tables or classes in the model

def init_model(engine):
    """Call me before using any of the tables or classes in the model"""
    if meta.Session is None:
        sm = orm.sessionmaker(autoflush=True, autocommit=False, bind=engine)

        meta.engine = engine
        meta.Session = orm.scoped_session(sm)