code: def get_best_parameters(
      experiment: Experiment,
      models_enum: Type[ModelRegistryBase],
      optimization_config: Optional[OptimizationConfig] = None,
      trial_indices: Optional[Iterable[int]] = None,
  ) -> Optional[Tuple[TParameterization, Optional[TModelPredictArm]]]:
      """Given an experiment, identifies the best arm.
  
      First attempts according to do so with models used in optimization and
      its corresponding predictions if available. Falls back to the best raw
      objective based on the data fetched from the experiment.
  
      TModelPredictArm is of the form:
          ({metric_name: mean}, {metric_name_1: {metric_name_2: cov_1_2}})
  
      Args:
          experiment: Experiment, on which to identify best raw objective arm.
          models_enum: Registry of all models that may be in the experiment's
              generation strategy.
          optimization_config: Optimization config to use in place of the one stored
              on the experiment.
          trial_indices: Indices of trials for which to retrieve data. If None will
              retrieve data from all available trials.
  
      Returns:
          Tuple of parameterization and model predictions for it.
      """
      res = get_best_parameters_with_trial_index(
          experiment=experiment,
          models_enum=models_enum,
          optimization_config=optimization_config,
          trial_indices=trial_indices,
      )
  
      if res is None:
          return None
  
      _, parameterization, vals = res
      return parameterization, vals
  
imports: from collections import OrderedDict
  from functools import reduce
  from logging import Logger
  from typing import Dict, Iterable, List, Optional, Tuple, Type
  import pandas
  import torch
  from ax.core.base_trial import TrialStatus
  from ax.core.batch_trial import BatchTrial
  from ax.core.data import Data
  from ax.core.experiment import Experiment
  from ax.core.generator_run import GeneratorRun
  from ax.core.objective import MultiObjective, Objective, ScalarizedObjective
  from ax.core.observation import Observation
  from ax.core.optimization_config import MultiObjectiveOptimizationConfig, OptimizationConfig
  from ax.core.outcome_constraint import ObjectiveThreshold, OutcomeConstraint
  from ax.core.trial import Trial
  from ax.core.types import ComparisonOp, TModelPredictArm, TParameterization
  from ax.exceptions.core import UnsupportedError, UserInputError
  from ax.modelbridge.base import ModelBridge
  from ax.modelbridge.cross_validation import assess_model_fit, compute_diagnostics, cross_validate
  from ax.modelbridge.generation_strategy import GenerationStrategy
  from ax.modelbridge.modelbridge_utils import observed_pareto_frontier, predicted_pareto_frontier
  from ax.modelbridge.registry import get_model_from_generator_run, ModelRegistryBase, Models
  from ax.modelbridge.torch import TorchModelBridge
  from ax.modelbridge.transforms.utils import derelativize_optimization_config_with_raw_status_quo
  from ax.plot.pareto_utils import get_tensor_converter_model
  from ax.utils.common.logger import get_logger
  from ax.utils.common.typeutils import checked_cast, not_none
  from numpy import NaN
  from torch import Tensor
label_desc: Use image node_id 10 for calling a global function with example usage: get_best_parameters(experiment, models_enum, optimization_config, trial_indices) and returns: parameterization,  vals, None