code: def mapping_fixture(self):
      # note in order to work nicely with "fixture" we are emerging
      # a whole new model of setup/teardown, since pytest "fixture"
      # sort of purposely works badly with setup/teardown
  
      registry = sqlalchemy.orm.registry()
  
      metadata = MetaData()
      parent = Table(
          "parent",
          metadata,
          Column("id", Integer, primary_key=True),
          Column("data", String(20)),
      )
      child = Table(
          "child",
          metadata,
          Column("id", Integer, primary_key=True),
          Column("data", String(20)),
          Column(
              "parent_id",
              Integer,
              ForeignKey("parent.id"),
              nullable=False,
          ),
      )
  
      class Parent(testing.entities.BasicEntity):
          pass
  
      class Child(testing.entities.BasicEntity):
          pass
  
      registry.map_imperatively(
          Parent,
          parent,
          properties={
              "children": relationship(Child, backref="parent")
          },
      )
      registry.map_imperatively(Child, child)
  
      registry.configure()
  
      yield Parent, Child
  
      registry.dispose()
  
imports: import sqlalchemy
  from sqlalchemy import Column
  from sqlalchemy import Enum
  from sqlalchemy import ForeignKey
  from sqlalchemy import inspect
  from sqlalchemy import Integer
  from sqlalchemy import MetaData
  from sqlalchemy import select
  from sqlalchemy import String
  from sqlalchemy import Table
  from sqlalchemy import testing
  from sqlalchemy.ext.declarative import ConcreteBase
  from sqlalchemy.orm import aliased
  from sqlalchemy.orm import join
  from sqlalchemy.orm import relationship
  from sqlalchemy.testing import eq_
  from sqlalchemy.testing import fixtures
  from sqlalchemy.testing import profiling
  from sqlalchemy.util import classproperty
label_desc: Use image node_id 1 for calling the CacheKeyTest obj's underlying member method code with example usage: obj.mapping_fixture() without return types