code: def test_joined_inheritance(self):
      class BaseClass(Versioned, self.Base, ComparableEntity):
          __tablename__ = "basetable"
  
          id = Column(Integer, primary_key=True)
          name = Column(String(50))
          type = Column(String(20))
  
          __mapper_args__ = {
              "polymorphic_on": type,
              "polymorphic_identity": "base",
          }
  
      class SubClassSeparatePk(BaseClass):
          __tablename__ = "subtable1"
  
          id = column_property(
              Column(Integer, primary_key=True), BaseClass.id
          )
          base_id = Column(Integer, ForeignKey("basetable.id"))
          subdata1 = Column(String(50))
  
          __mapper_args__ = {"polymorphic_identity": "sep"}
  
      class SubClassSamePk(BaseClass):
          __tablename__ = "subtable2"
  
          id = Column(
              Integer, ForeignKey("basetable.id"), primary_key=True
          )
          subdata2 = Column(String(50))
  
          __mapper_args__ = {"polymorphic_identity": "same"}
  
      self.create_tables()
      sess = self.session
  
      sep1 = SubClassSeparatePk(name="sep1", subdata1="sep1subdata")
      base1 = BaseClass(name="base1")
      same1 = SubClassSamePk(name="same1", subdata2="same1subdata")
      sess.add_all([sep1, base1, same1])
      sess.commit()
  
      base1.name = "base1mod"
      same1.subdata2 = "same1subdatamod"
      sep1.name = "sep1mod"
      sess.commit()
  
      BaseClassHistory = BaseClass.__history_mapper__.class_
      SubClassSeparatePkHistory = (
          SubClassSeparatePk.__history_mapper__.class_
      )
      SubClassSamePkHistory = SubClassSamePk.__history_mapper__.class_
      eq_(
          sess.query(BaseClassHistory)
          .order_by(BaseClassHistory.id)
          .all(),
          [
              SubClassSeparatePkHistory(
                  id=1, name="sep1", type="sep", version=1
              ),
              BaseClassHistory(
                  id=2, name="base1", type="base", version=1
              ),
              SubClassSamePkHistory(
                  id=3, name="same1", type="same", version=1
              ),
          ],
      )
  
      same1.subdata2 = "same1subdatamod2"
  
      eq_(
          sess.query(BaseClassHistory)
          .order_by(BaseClassHistory.id, BaseClassHistory.version)
          .all(),
          [
              SubClassSeparatePkHistory(
                  id=1, name="sep1", type="sep", version=1
              ),
              BaseClassHistory(
                  id=2, name="base1", type="base", version=1
              ),
              SubClassSamePkHistory(
                  id=3, name="same1", type="same", version=1
              ),
              SubClassSamePkHistory(
                  id=3, name="same1", type="same", version=2
              ),
          ],
      )
  
      base1.name = "base1mod2"
      eq_(
          sess.query(BaseClassHistory)
          .order_by(BaseClassHistory.id, BaseClassHistory.version)
          .all(),
          [
              SubClassSeparatePkHistory(
                  id=1, name="sep1", type="sep", version=1
              ),
              BaseClassHistory(
                  id=2, name="base1", type="base", version=1
              ),
              BaseClassHistory(
                  id=2, name="base1mod", type="base", version=2
              ),
              SubClassSamePkHistory(
                  id=3, name="same1", type="same", version=1
              ),
              SubClassSamePkHistory(
                  id=3, name="same1", type="same", version=2
              ),
          ],
      )
  
imports: import unittest
  import warnings
  from sqlalchemy import Boolean
  from sqlalchemy import Column
  from sqlalchemy import create_engine
  from sqlalchemy import ForeignKey
  from sqlalchemy import inspect
  from sqlalchemy import Integer
  from sqlalchemy import join
  from sqlalchemy import select
  from sqlalchemy import String
  from sqlalchemy.orm import clear_mappers
  from sqlalchemy.orm import column_property
  from sqlalchemy.orm import declarative_base
  from sqlalchemy.orm import DeclarativeBase
  from sqlalchemy.orm import deferred
  from sqlalchemy.orm import exc
  from sqlalchemy.orm import relationship
  from sqlalchemy.orm import Session
  from sqlalchemy.testing import assert_raises
  from sqlalchemy.testing import AssertsCompiledSQL
  from sqlalchemy.testing import eq_
  from sqlalchemy.testing import eq_ignore_whitespace
  from sqlalchemy.testing import is_
  from sqlalchemy.testing import ne_
  from sqlalchemy.testing.entities import ComparableEntity
  from .history_meta import Versioned
  from .history_meta import versioned_session
label_desc: Use image node_id 11 for calling the TestVersioning obj's underlying member method code with example usage: obj.test_joined_inheritance() without return types