code: def test_get_pending_observation_features_batch_trial(self) -> None:
      # Check the same functionality for batched trials.
      self.assertIsNone(
          get_pending_observation_features(self.experiment_2)
      )
      self.batch_trial.mark_running(no_runner_required=True)
      # Status quo of this experiment is out-of-design, so it shouldn't be
      # among the pending points.
      self.assertEqual(
          get_pending_observation_features(self.experiment_2),
          {
              "tracking": [self.obs_feat],
              "m2": [self.obs_feat],
              "m1": [self.obs_feat],
          },
      )
  
      # Status quo of this experiment is out-of-design, so it shouldn't be
      # among the pending points.
      sq_obs_feat = ObservationFeatures.from_arm(
          self.batch_trial.arms_by_name.get("status_quo"),
          trial_index=self.batch_trial.index,
      )
      self.assertEqual(
          get_pending_observation_features(
              self.experiment_2,
              include_out_of_design_points=True,
          ),
          {
              "tracking": [self.obs_feat, sq_obs_feat],
              "m2": [self.obs_feat, sq_obs_feat],
              "m1": [self.obs_feat, sq_obs_feat],
          },
      )
      self.batch_trial.mark_completed()
  
      # Set SQ to in-design; then we can expect it to appear among the pending
      # points without specifying `include_out_of_design_points=True`.
      exp = get_experiment(with_status_quo=False)
      in_design_status_quo = Arm(
          name="in_design_status_quo",
          parameters={"w": 5.45, "x": 5, "y": "bar", "z": True},
      )
      exp.status_quo = in_design_status_quo
      batch = exp.new_batch_trial().add_arm(self.arm)
      batch.set_status_quo_with_weight(exp.status_quo, 1)
      self.assertEqual(batch.status_quo, in_design_status_quo)
      self.assertTrue(
          exp.search_space.check_membership(
              in_design_status_quo.parameters, raise_error=True
          )
      )
      batch.mark_running(no_runner_required=True)
      sq_obs_feat = ObservationFeatures.from_arm(
          in_design_status_quo,
          trial_index=batch.index,
      )
      self.assertEqual(
          get_pending_observation_features(exp),
          {
              "tracking": [self.obs_feat, sq_obs_feat],
              "m2": [self.obs_feat, sq_obs_feat],
              "m1": [self.obs_feat, sq_obs_feat],
          },
      )
  
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 8 for calling the UtilsTest obj's underlying member method code with example usage: obj.test_get_pending_observation_features_batch_trial() without return types