code: def _get_out_of_sample_arms(
      model: ModelBridge,
      generator_runs_dict: Dict[str, GeneratorRun],
      metric_names: Set[str],
      fixed_features: Optional[ObservationFeatures] = None,
      scalarized_metric_config: Optional[
          List[Dict[str, Dict[str, float]]]
      ] = None,
  ) -> Dict[str, Dict[str, PlotOutOfSampleArm]]:
      """Get out-of-sample predictions from a model given a dict of generator runs.
  
      Fixed features input can be used to override fields of the candidate arms
      when making model predictions.
  
      Args:
          model: The model.
          generator_runs_dict: a mapping from generator run name to generator run.
          metric_names: metrics to include in the plot.
  
      Returns:
          A mapping from name to a mapping from arm name to plot.
  
      """
      out_of_sample_plot: Dict[str, Dict[str, PlotOutOfSampleArm]] = {}
      for (
          generator_run_name,
          generator_run,
      ) in generator_runs_dict.items():
          out_of_sample_plot[generator_run_name] = {}
          for arm in generator_run.arms:
              # This assumes context is None
              obsf = ObservationFeatures.from_arm(arm)
              if fixed_features is not None:
                  obsf.update_features(fixed_features)
  
              # Make a prediction
              try:
                  pred_y, pred_se = predict_at_point(
                      model,
                      obsf,
                      metric_names,
                      scalarized_metric_config,
                  )
              except Exception:
                  # Check if it is an out-of-design arm.
                  if not model.model_space.check_membership(
                      obsf.parameters
                  ):
                      # Skip this point
                      continue
                  else:
                      # It should have worked
                      raise
              arm_name = arm.name_or_short_signature
              out_of_sample_plot[generator_run_name][
                  arm_name
              ] = PlotOutOfSampleArm(
                  name=arm_name,
                  parameters=obsf.parameters,
                  y_hat=pred_y,
                  se_hat=pred_se,
                  context_stratum=None,
              )
      return out_of_sample_plot
  
imports: import math
  from collections import Counter
  from logging import Logger
  from typing import Any, Callable, Dict, List, Optional, Set, Tuple, Union
  import numpy
  from ax.core.generator_run import GeneratorRun
  from ax.core.observation import Observation, ObservationFeatures
  from ax.core.parameter import ChoiceParameter, FixedParameter, Parameter, ParameterType, RangeParameter
  from ax.core.types import TParameterization
  from ax.modelbridge.base import ModelBridge
  from ax.modelbridge.prediction_utils import _compute_scalarized_outcome, predict_at_point
  from ax.modelbridge.transforms.ivw import IVW
  from ax.plot.base import DECIMALS, PlotData, PlotInSampleArm, PlotOutOfSampleArm, Z
  from ax.utils.common.logger import get_logger
  from ax.utils.common.typeutils import not_none
label_desc: Use image node_id 10 for calling a global function with example usage: _get_out_of_sample_arms(model, generator_runs_dict, metric_names, fixed_features, scalarized_metric_config) and returns: out_of_sample_plot