code: def extract_arm_predictions(
      model_predictions: TModelPredict, arm_idx: int
  ) -> TModelPredictArm:
      """Extract a particular arm from model_predictions.
  
      Args:
          model_predictions: Mean and Cov for all arms.
          arm_idx: Index of arm in prediction list.
  
      Returns:
          (mean, cov) for specified arm.
      """
  
      means = model_predictions[0]
      covariances = model_predictions[1]
      means_per_arm = {
          metric: means[metric][arm_idx] for metric in means.keys()
      }
      covar_per_arm = {
          metric: {
              other_metric: covariances[metric][other_metric][arm_idx]
              for other_metric in covariances[metric].keys()
          }
          for metric in covariances.keys()
      }
      return means_per_arm, covar_per_arm
  
imports: from __future__ import annotations
  import copy
  from collections import OrderedDict
  from dataclasses import dataclass
  from datetime import datetime
  from enum import Enum
  from logging import Logger
  from typing import Any, Dict, List, MutableMapping, Optional, Set, Tuple
  import pandas
  from ax.core.arm import Arm
  from ax.core.optimization_config import OptimizationConfig
  from ax.core.search_space import SearchSpace
  from ax.core.types import TCandidateMetadata, TGenMetadata, TModelPredict, TModelPredictArm
  from ax.exceptions.core import UnsupportedError
  from ax.utils.common.base import Base, SortableBase
  from ax.utils.common.logger import get_logger
  from ax.utils.common.typeutils import not_none
label_desc: Use image node_id 1 for calling a global function with example usage: extract_arm_predictions(model_predictions, arm_idx) and returns: means_per_arm,  covar_per_arm