code: def listens_for_multiple(
      targets: List[InstrumentedAttribute],
      identifier: str,
      *args: Any,
      **kwargs: Any
      # pyre-fixme[24]: Generic type `Callable` expects 2 type parameters.
  ) -> Callable:
      """Analogue of SQLAlchemy `listen_for`, but applies the same listening handler
      function to multiple instrumented attributes.
      """
  
      # pyre-fixme[3]: Return type must be annotated.
      # pyre-fixme[24]: Generic type `Callable` expects 2 type parameters.
      def wrapper(fn: Callable):
          for target in targets:
              event.listen(target, identifier, fn, *args, **kwargs)
          return fn
  
      return wrapper
  
file_path: Ax/ax/storage/sqa_store/validation.py
imports: from logging import Logger
  from typing import Any, Callable, List, TypeVar
  from ax.storage.sqa_store.db import SQABase
  from ax.storage.sqa_store.reduced_state import GR_LARGE_MODEL_ATTRS
  from ax.storage.sqa_store.sqa_classes import ONLY_ONE_FIELDS, ONLY_ONE_METRIC_FIELDS, SQAMetric, SQAParameter, SQAParameterConstraint, SQARunner
  from ax.utils.common.logger import get_logger
  from sqlalchemy import event
  from sqlalchemy.engine import Connection
  from sqlalchemy.orm.attributes import InstrumentedAttribute
  from sqlalchemy.orm.base import NO_VALUE
  from sqlalchemy.orm.mapper import Mapper
label_desc: Use image node_id 1 for calling a global function with example usage: listens_for_multiple(targets, identifier) and returns: wrapper, fn