code: def setUp(self) -> None:
      self.experiment = get_experiment()
      self.arm = Arm({"x": 5, "y": "foo", "z": True, "w": 5})
      self.trial = self.experiment.new_trial(GeneratorRun([self.arm]))
      self.experiment_2 = get_experiment()
      self.batch_trial = self.experiment_2.new_batch_trial(
          GeneratorRun([self.arm])
      )
      self.batch_trial.set_status_quo_with_weight(
          self.experiment_2.status_quo, 1
      )
      self.obs_feat = ObservationFeatures.from_arm(
          arm=self.trial.arm, trial_index=self.trial.index
      )
      self.hss_arm = Arm({"model": "XGBoost", "num_boost_rounds": 12})
      self.hss_exp = get_hierarchical_search_space_experiment()
      self.hss_gr = GeneratorRun(
          arms=[self.hss_arm],
          candidate_metadata_by_arm_signature={
              self.hss_arm.signature: {
                  Keys.FULL_PARAMETERIZATION: {
                      "model_name": "XGBoost",
                      "num_boost_rounds": 12,
                      "learning_rate": 0.01,
                      "l2_reg_weight": 0.0001,
                  }
              }
          },
      )
      self.hss_trial = self.hss_exp.new_trial(self.hss_gr)
      self.hss_cand_metadata = self.hss_trial._get_candidate_metadata(
          arm_name=self.hss_arm.name
      )
      self.hss_full_parameterization = self.hss_cand_metadata.get(
          Keys.FULL_PARAMETERIZATION
      ).copy()
      self.hss_obs_feat = ObservationFeatures.from_arm(
          arm=self.hss_arm,
          trial_index=self.hss_trial.index,
          metadata=self.hss_cand_metadata,
      )
      self.hss_obs_feat_all_params = ObservationFeatures.from_arm(
          arm=Arm(self.hss_full_parameterization),
          trial_index=self.hss_trial.index,
          metadata={
              Keys.FULL_PARAMETERIZATION: self.hss_full_parameterization
          },
      )
      self.df = pd.DataFrame(
          [
              {
                  "arm_name": "0_0",
                  "mean": 2.0,
                  "sem": 0.2,
                  "trial_index": 1,
                  "metric_name": "a",
                  "start_time": "2018-01-01",
                  "end_time": "2018-01-02",
              },
              {
                  "arm_name": "0_0",
                  "mean": 1.8,
                  "sem": 0.3,
                  "trial_index": 1,
                  "metric_name": "b",
                  "start_time": "2018-01-01",
                  "end_time": "2018-01-02",
              },
              {
                  "arm_name": "0_1",
                  "mean": float("nan"),
                  "sem": float("nan"),
                  "trial_index": 1,
                  "metric_name": "a",
                  "start_time": "2018-01-01",
                  "end_time": "2018-01-02",
              },
              {
                  "arm_name": "0_1",
                  "mean": 3.7,
                  "sem": 0.5,
                  "trial_index": 1,
                  "metric_name": "b",
                  "start_time": "2018-01-01",
                  "end_time": "2018-01-02",
              },
              {
                  "arm_name": "0_2",
                  "mean": 0.5,
                  "sem": None,
                  "trial_index": 1,
                  "metric_name": "a",
                  "start_time": "2018-01-01",
                  "end_time": "2018-01-02",
              },
              {
                  "arm_name": "0_2",
                  "mean": float("nan"),
                  "sem": float("nan"),
                  "trial_index": 1,
                  "metric_name": "b",
                  "start_time": "2018-01-01",
                  "end_time": "2018-01-02",
              },
              {
                  "arm_name": "0_2",
                  "mean": float("nan"),
                  "sem": float("nan"),
                  "trial_index": 1,
                  "metric_name": "c",
                  "start_time": "2018-01-01",
                  "end_time": "2018-01-02",
              },
          ]
      )
  
      self.data = Data(df=self.df)
  
      self.optimization_config = OptimizationConfig(
          objective=Objective(metric=Metric(name="a")),
          outcome_constraints=[
              OutcomeConstraint(
                  metric=Metric(name="b"),
                  op=ComparisonOp.GEQ,
                  bound=0,
                  relative=False,
              )
          ],
      )
  
imports: from copy import deepcopy
  from unittest.mock import patch
  import numpy
  import pandas
  from ax.core.arm import Arm
  from ax.core.base_trial import TrialStatus
  from ax.core.data import Data
  from ax.core.generator_run import GeneratorRun
  from ax.core.metric import Metric
  from ax.core.objective import Objective
  from ax.core.observation import ObservationFeatures
  from ax.core.optimization_config import OptimizationConfig
  from ax.core.outcome_constraint import OutcomeConstraint
  from ax.core.types import ComparisonOp
  from ax.core.utils import best_feasible_objective, extract_pending_observations, get_missing_metrics, get_missing_metrics_by_name, get_model_times, get_model_trace_of_times, get_pending_observation_features, get_pending_observation_features_based_on_trial_status, MissingMetrics
  from ax.utils.common.constants import Keys
  from ax.utils.common.testutils import TestCase
  from ax.utils.testing.core_stubs import get_experiment, get_hierarchical_search_space_experiment, get_robust_branin_experiment
  from pyre_extensions import none_throws
label_desc: Use image node_id 1 for calling the UtilsTest obj's underlying member method code with example usage: obj.setUp() without return types