code: def test_get_pending_observation_features_based_on_trial_status_hss(
      self,
  ) -> None:
      self.assertTrue(self.hss_trial.status.is_candidate)
      self.assertIsNone(get_pending_status(self.hss_exp))
      self.hss_trial.mark_staged()
      # Now that the trial is staged, it should become a pending trial on the
      # experiment and appear as pending for all metrics.
      pending = get_pending_status(self.hss_exp)
      self.assertEqual(
          pending,
          {
              "m1": [self.hss_obs_feat],
              "m2": [self.hss_obs_feat],
          },
      )
  
      # Same should be true for running trial.
      # NOTE: Can't mark a staged trial running unless it uses a runner that
      # specifically requires staging; hacking around that here since the marking
      # logic does not matter for this test.
      self.hss_trial._status = TrialStatus.RUNNING
      # Now that the trial is staged, it should become a pending trial on the
      # experiment and appear as pending for all metrics.
      pending = get_pending_status(self.hss_exp)
      self.assertEqual(
          pending,
          {
              "m1": [self.hss_obs_feat],
              "m2": [self.hss_obs_feat],
          },
      )
      # When a trial is marked failed, it should no longer appear in pending.
      self.hss_trial.mark_failed()
      self.assertIsNone(get_pending_status(self.hss_exp))
      # And if the trial is abandoned, it should always appear in pending features.
      self.hss_trial._status = (
          TrialStatus.ABANDONED
      )  # Cannot re-mark a failed trial.
      self.assertEqual(
          pending,
          {
              "m1": [self.hss_obs_feat],
              "m2": [self.hss_obs_feat],
          },
      )
  
      # Check that transforming observation features works correctly (it should inject
      # full parameterization into resulting obs.feats.)
      for p in none_throws(pending).values():
          for pf in p:
              self.assertEqual(
                  none_throws(pf.metadata),
                  none_throws(
                      self.hss_gr.candidate_metadata_by_arm_signature
                  )[self.hss_arm.signature],
              )
  
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 10 for calling the UtilsTest obj's underlying member method code with example usage: obj.test_get_pending_observation_features_based_on_trial_status_hss() without return types