class_docstr: deals with inheritance and many-to-many relationships
class_docstr_tok: ["deals","with","inheritance","and","many-to-many","relationships"]
code: def define_tables(cls, metadata):
      global principals
      global users
      global groups
      global user_group_map
  
      principals = Table(
          "principals",
          metadata,
          Column(
              "principal_id",
              Integer,
              normalize_sequence(
                  config, Sequence("principal_id_seq", optional=False)
              ),
              primary_key=True,
          ),
          Column("name", String(50), nullable=False),
      )
  
      users = Table(
          "prin_users",
          metadata,
          Column(
              "principal_id",
              Integer,
              ForeignKey("principals.principal_id"),
              primary_key=True,
          ),
          Column("password", String(50), nullable=False),
          Column("email", String(50), nullable=False),
          Column("login_id", String(50), nullable=False),
      )
  
      groups = Table(
          "prin_groups",
          metadata,
          Column(
              "principal_id",
              Integer,
              ForeignKey("principals.principal_id"),
              primary_key=True,
          ),
      )
  
      user_group_map = Table(
          "prin_user_group_map",
          metadata,
          Column(
              "user_id",
              Integer,
              ForeignKey("prin_users.principal_id"),
              primary_key=True,
          ),
          Column(
              "group_id",
              Integer,
              ForeignKey("prin_groups.principal_id"),
              primary_key=True,
          ),
      )
  
imports: from sqlalchemy import Column
  from sqlalchemy import ForeignKey
  from sqlalchemy import Integer
  from sqlalchemy import Sequence
  from sqlalchemy import String
  from sqlalchemy import Table
  from sqlalchemy.orm import class_mapper
  from sqlalchemy.orm import relationship
  from sqlalchemy.testing import config
  from sqlalchemy.testing import eq_
  from sqlalchemy.testing import fixtures
  from sqlalchemy.testing.fixtures import fixture_session
  from sqlalchemy.testing.provision import normalize_sequence
label_desc: Use image node_id 1 for calling the InheritTest obj's underlying member method code with example usage: obj.define_tables(cls, metadata) without return types