def __table_cls__(cls, *args, **kwargs):
<EOL>key = _get_table_key(args[<NUM_LIT:0>], kwargs.get('<STR_LIT>'))<EOL>if key in cls.metadata.tables:<EOL><INDENT>return sa.Table(*args, **kwargs)<EOL><DEDENT>for arg in args:<EOL><INDENT>if (<EOL>(isinstance(arg, sa.Column) and arg.primary_key)<EOL>or isinstance(arg, sa.PrimaryKeyConstraint)<EOL>):<EOL><INDENT>return sa.Table(*args, **kwargs)<EOL><DEDENT><DEDENT>for base in cls.__mro__[<NUM_LIT:1>:-<NUM_LIT:1>]:<EOL><INDENT>if '<STR_LIT>' in base.__dict__:<EOL><INDENT>break<EOL><DEDENT><DEDENT>else:<EOL><INDENT>return sa.Table(*args, **kwargs)<EOL><DEDENT>if '<STR_LIT>' in cls.__dict__:<EOL><INDENT>del cls.__tablename__<EOL><DEDENT>
This is called by SQLAlchemy during mapper setup. It determines the
        final table object that the model will use.

        If no primary key is found, that indicates single-table inheritance,
        so no table will be created and ``__tablename__`` will be unset.