code: def session_with_data(session: Session) -> Iterator[Session]:
      from superset.connectors.sqla.models import SqlaTable
      from superset.models.core import Database
  
      engine = session.get_bind()
      SqlaTable.metadata.create_all(engine)  # pylint: disable=no-member
  
      db = Database(
          database_name="my_database", sqlalchemy_uri="sqlite://"
      )
      sqla_table = SqlaTable(
          table_name="my_sqla_table",
          columns=[],
          metrics=[],
          database=db,
      )
  
      session.add(db)
      session.add(sqla_table)
      session.flush()
      yield session
      session.rollback()
  
file_path: superset/tests/unit_tests/datasets/dao/dao_tests.py
imports: from collections.abc import Iterator
  import pytest
  from sqlalchemy.orm.session import Session
label_desc: Use image node_id 1 for calling a global function with example usage: session_with_data(session) without return types