code: def test_extract_pending_observations(self) -> None:
      exp_with_many_trials = get_experiment()
      for _ in range(100):
          exp_with_many_trials.new_trial().add_arm(self.arm)
  
      exp_with_many_trials_and_batch = deepcopy(exp_with_many_trials)
      exp_with_many_trials_and_batch.new_batch_trial().add_arm(self.arm)
  
      m = extract_pending_observations.__module__
      with patch(
          f"{m}.get_pending_observation_features"
      ) as mock_pending, patch(
          f"{m}.get_pending_observation_features_based_on_trial_status"
      ) as mock_pending_ts:
          # Check the typical case: few trials, we can use regular `get_pending...`.
          extract_pending_observations(experiment=self.experiment)
          mock_pending.assert_called_once_with(
              experiment=self.experiment,
              include_out_of_design_points=False,
          )
          mock_pending.reset_mock()
  
          # Check out-of-design filter propagation.
          extract_pending_observations(
              experiment=self.experiment,
              include_out_of_design_points=True,
          )
          mock_pending.assert_called_once_with(
              experiment=self.experiment,
              include_out_of_design_points=True,
          )
          mock_pending.reset_mock()
  
          # Check many-trials case and out-of-design filter propagation.
          extract_pending_observations(
              experiment=exp_with_many_trials,
              include_out_of_design_points=True,
          )
          mock_pending_ts.assert_called_once_with(
              experiment=exp_with_many_trials,
              include_out_of_design_points=True,
          )
  
          # Check "many-trials but batch trial present" case
          # and out-of-design filter propagation.
          extract_pending_observations(
              experiment=exp_with_many_trials_and_batch,
              include_out_of_design_points=True,
          )
          mock_pending_ts.assert_called_once_with(
              experiment=exp_with_many_trials,
              include_out_of_design_points=True,
          )
  
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 11 for calling the UtilsTest obj's underlying member method code with example usage: obj.test_extract_pending_observations() without return types