code: def _reference_table(cls, ref_table):
          
          # create pairs of (Foreign key column, primary key column)
          cols = [(sa.Column(), refcol) for refcol in ref_table.primary_key]
  
          # set "tablename_colname = Foreign key Column" on the local class
          for col, refcol in cols:
              setattr(cls, "%s_%s" % (ref_table.name, refcol.name), col)
  
          # add a ForeignKeyConstraint([local columns], [remote columns])
          cls.__table__.append_constraint(sa.ForeignKeyConstraint(*zip(*cols)))
docs: 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.