code: def arm_name_to_sort_key(arm_name: str) -> Tuple[str, int, int]:
      """Parses arm name into tuple suitable for reverse sorting by key
  
      Example:
          arm_names = ["0_0", "1_10", "1_2", "10_0", "control"]
          sorted(arm_names, key=arm_name_to_sort_key, reverse=True)
          ["control", "0_0", "1_2", "1_10", "10_0"]
      """
      try:
          trial_index, arm_index = arm_name.split("_")
          return ("", -int(trial_index), -int(arm_index))
      except (ValueError, IndexError):
          return (arm_name, 0, 0)
  
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 6 for calling a global function with example usage: arm_name_to_sort_key(arm_name) and returns: str,  unknown,  unknown, arm_name,  int,  int