code: def get_early_stopping_metrics(
      experiment: Experiment,
      early_stopping_strategy: Optional[BaseEarlyStoppingStrategy],
  ) -> List[str]:
      """A helper function that returns a list of metric names on which a given
      `early_stopping_strategy` is operating."""
      if early_stopping_strategy is None:
          return []
      if early_stopping_strategy.metric_names is not None:
          return list(early_stopping_strategy.metric_names)
      (
          default_objective,
          _,
      ) = early_stopping_strategy._default_objective_and_direction(
          experiment=experiment
      )
      return [default_objective]
  
imports: from typing import Dict, List, Optional, Set
  from ax.core.experiment import Experiment
  from ax.early_stopping.strategies import BaseEarlyStoppingStrategy
  from ax.utils.common.typeutils import not_none
label_desc: Use image node_id 2 for calling a global function with example usage: get_early_stopping_metrics(experiment, early_stopping_strategy) and returns: list, list, list