code: def get_engine() -> Engine:
      """Fetch a SQLAlchemy engine, if already initialized.
  
      If not initialized, need to either call `init_engine_and_session_factory` or
      `get_session` explicitly.
  
      Returns:
          Engine: an instance of a SQLAlchemy engine with a connection to a DB.
  
      """
      global SESSION_FACTORY
      if SESSION_FACTORY is None:
          raise ValueError("Engine must be initialized first.")
      return SESSION_FACTORY.bind
  
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 8 for calling a global function with example usage: get_engine() and returns: SESSION_FACTORY