code: def get_fixed_values(
      model: ModelBridge,
      slice_values: Optional[Dict[str, Any]] = None,
      trial_index: Optional[int] = None,
  ) -> TParameterization:
      """Get fixed values for parameters in a slice plot.
  
      If there is an in-design status quo, those values will be used. Otherwise,
      the mean of RangeParameters or the mode of ChoiceParameters is used.
  
      Any value in slice_values will override the above.
  
      Args:
          model: ModelBridge being used for plotting
          slice_values: Map from parameter name to value at which is should be
              fixed.
  
      Returns: Map from parameter name to fixed value.
      """
  
      if trial_index is not None:
          if slice_values is None:
              slice_values = {}
          slice_values["TRIAL_PARAM"] = str(trial_index)
  
      # Check if status_quo is in design
      if (
          model.status_quo is not None
          and model.model_space.check_membership(
              model.status_quo.features.parameters
          )
      ):
          setx = model.status_quo.features.parameters
      else:
          observations = model.get_training_data()
          setx = {}
          for p_name, parameter in model.model_space.parameters.items():
              # Exclude out of design status quo (no parameters)
              vals = [
                  obs.features.parameters[p_name]
                  for obs in observations
                  if (
                      len(obs.features.parameters) > 0
                      and parameter.validate(
                          obs.features.parameters[p_name]
                      )
                  )
              ]
              if isinstance(parameter, FixedParameter):
                  setx[p_name] = parameter.value
              elif isinstance(parameter, ChoiceParameter):
                  setx[p_name] = Counter(vals).most_common(1)[0][0]
              elif isinstance(parameter, RangeParameter):
                  setx[p_name] = parameter.cast(np.mean(vals))
  
      if slice_values is not None:
          # slice_values has type Dictionary[str, Any]
          setx.update(slice_values)
      return setx
  
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 16 for calling a global function with example usage: get_fixed_values(model, slice_values, trial_index) and returns: setx