@classmethod<EOL><INDENT>def _reference_table(cls, ref_table):<DEDENT>
<EOL>cols = [(sa.Column(), refcol) for refcol in ref_table.primary_key]<EOL>for col, refcol in cols:<EOL><INDENT>setattr(cls, "<STR_LIT>" % (ref_table.name, refcol.name), col)<EOL><DEDENT>cls.__table__.append_constraint(sa.ForeignKeyConstraint(*zip(*cols)))<EOL>
Create a foreign key reference from the local class to the given remote
        table.

        Adds column references to the declarative class and adds a
        ForeignKeyConstraint.