code: def test_get_bind_inheritance(app: Flask, model_class: t.Any) -> None:
      app.config["SQLALCHEMY_BINDS"] = {"a": "sqlite://"}
      db = SQLAlchemy(app, model_class=model_class)
  
      if issubclass(db.Model, (sa_orm.MappedAsDataclass)):
  
          class User(db.Model):
              __bind_key__ = "a"
              id: sa_orm.Mapped[int] = sa_orm.mapped_column(
                  sa.Integer, primary_key=True, init=False
              )
              type: sa_orm.Mapped[str] = sa_orm.mapped_column(
                  sa.String, nullable=False, init=False
              )
              __mapper_args__ = {
                  "polymorphic_on": type,
                  "polymorphic_identity": "user",
              }
  
          class Admin(User):
              id: sa_orm.Mapped[int] = sa_orm.mapped_column(
                  sa.ForeignKey(User.id), primary_key=True, init=False
              )
              org: sa_orm.Mapped[str] = sa_orm.mapped_column(
                  sa.String, nullable=False
              )
              __mapper_args__ = {"polymorphic_identity": "admin"}
  
      elif issubclass(
          db.Model,
          (sa_orm.DeclarativeBase, sa_orm.DeclarativeBaseNoMeta),
      ):
  
          class User(db.Model):  # type: ignore[no-redef]
              __bind_key__ = "a"
              id: sa_orm.Mapped[int] = sa_orm.mapped_column(
                  sa.Integer, primary_key=True
              )
              type: sa_orm.Mapped[str] = sa_orm.mapped_column(
                  sa.String, nullable=False
              )
              __mapper_args__ = {
                  "polymorphic_on": type,
                  "polymorphic_identity": "user",
              }
  
          class Admin(User):  # type: ignore[no-redef]
              id: sa_orm.Mapped[int] = sa_orm.mapped_column(
                  sa.ForeignKey(User.id), primary_key=True
              )
              org: sa_orm.Mapped[str] = sa_orm.mapped_column(
                  sa.String, nullable=False
              )
              __mapper_args__ = {"polymorphic_identity": "admin"}
  
      else:
  
          class User(db.Model):  # type: ignore[no-redef]
              __bind_key__ = "a"
              id = sa.Column(sa.Integer, primary_key=True)
              type = sa.Column(sa.String, nullable=False)
              __mapper_args__ = {
                  "polymorphic_on": type,
                  "polymorphic_identity": "user",
              }
  
          class Admin(User):  # type: ignore[no-redef]
              id = sa.Column(sa.ForeignKey(User.id), primary_key=True)  # type: ignore[assignment]
              org = sa.Column(sa.String, nullable=False)
              __mapper_args__ = {"polymorphic_identity": "admin"}
  
      db.create_all()
      db.session.add(Admin(org="pallets"))
      db.session.commit()
      admin = db.session.execute(db.select(Admin)).scalar_one()
      db.session.expire(admin)
      assert admin.org == "pallets"
  
file_path: flask-sqlalchemy/tests/test_session.py
imports: from __future__ import annotations
  import typing
  import pytest
  import sqlalchemy
  import sqlalchemy.orm
  from flask import Flask
  from flask_sqlalchemy import SQLAlchemy
  from flask_sqlalchemy.session import Session
label_desc: Use image node_id 5 for calling a global function with example usage: test_get_bind_inheritance(app, model_class) without return types