@memoize_id
def TTableModel(metadata=None):
 from sqlalchemy import MetaData
 @add_metaclass(ComplexModelMeta)
 class TableModel(TTableModelBase(), ):
  class Attributes(ComplexModelBase.Attributes, ):
   sqla_metadata = (metadata or MetaData())
 return TableModel

@ memoize_id def TTableModel ( metadata = None ) : from sqlalchemy import MetaData @ add_metaclass ( ComplexModelMeta ) class TableModel ( TTableModelBase ( ) , ) : class Attributes ( ComplexModelBase . Attributes , ) : sqla_metadata = ( metadata or MetaData ( ) ) return TableModel
a tablemodel template that generates a new tablemodel class for each call .