code: def session_scope() -> Generator[Session, None, None]:
      """Provide a transactional scope around a series of operations."""
      session = get_session()
      try:
          yield session
          session.commit()
      except Exception:
          session.rollback()
          raise
      finally:
          session.close()
  
file_path: Ax/ax/storage/sqa_store/db.py
imports: from __future__ import annotations
  from contextlib import contextmanager
  from typing import Any, Callable, Generator, Optional, TypeVar
  from sqlalchemy import create_engine
  from sqlalchemy.engine.base import Engine
  from sqlalchemy.ext.declarative import declarative_base
  from sqlalchemy.orm import scoped_session, Session, sessionmaker
label_desc: Use image node_id 9 for calling a global function with example usage: session_scope() without return types