code: def test_pending_observations_as_array_list(self) -> None:
      # Mark a trial dispatched so that there are pending observations.
      self.trial.mark_running(no_runner_required=True)
      # If outcome names are respected, unlisted metrics should be filtered out.
      self.assertEqual(
          [
              x.tolist()
              for x in none_throws(
                  pending_observations_as_array_list(
                      pending_observations=none_throws(
                          get_pending_observation_features(
                              self.experiment
                          )
                      ),
                      outcome_names=["m2", "m1"],
                      param_names=["x", "y", "z", "w"],
                  )
              )
          ],
          [[TEST_PARAMETERIZATON_LIST], [TEST_PARAMETERIZATON_LIST]],
      )
      self.experiment.attach_data(
          Data.from_evaluations(
              {self.trial.arm.name: {"m2": (1, 0)}},
              trial_index=self.trial.index,
          )
      )
      # With `fetch_data` on trial returning data for metric "m2", that metric
      # should no longer have pending observation features.
      with patch.object(
          self.trial,
          "fetch_data",
          return_value=Data.from_evaluations(
              {self.trial.arm.name: {"m2": (1, 0)}},
              trial_index=self.trial.index,
          ),
      ):
          pending = none_throws(
              get_pending_observation_features(self.experiment)
          )
      # There should be no pending observations for metric m2 now, since the
      # only trial there is, has been updated with data for it.
      self.assertEqual(
          [
              x.tolist()
              for x in none_throws(
                  pending_observations_as_array_list(
                      pending_observations=pending,
                      outcome_names=["m2", "m1"],
                      param_names=["x", "y", "z", "w"],
                  )
              )
          ],
          [[], [TEST_PARAMETERIZATON_LIST]],
      )
  
imports: from unittest import mock
  from unittest.mock import patch
  import numpy
  from ax.core.arm import Arm
  from ax.core.data import Data
  from ax.core.generator_run import GeneratorRun
  from ax.core.metric import Metric
  from ax.core.objective import MultiObjective, Objective
  from ax.core.observation import ObservationData, ObservationFeatures
  from ax.core.optimization_config import MultiObjectiveOptimizationConfig
  from ax.core.outcome_constraint import ObjectiveThreshold, OutcomeConstraint, ScalarizedOutcomeConstraint
  from ax.core.types import ComparisonOp
  from ax.core.utils import get_pending_observation_features
  from ax.modelbridge.modelbridge_utils import extract_objective_thresholds, extract_outcome_constraints, feasible_hypervolume, observation_data_to_array, pending_observations_as_array_list
  from ax.modelbridge.registry import Models
  from ax.utils.common.constants import Keys
  from ax.utils.common.testutils import TestCase
  from ax.utils.common.typeutils import not_none
  from ax.utils.testing.core_stubs import get_experiment, get_hierarchical_search_space_experiment
  from pyre_extensions import none_throws
label_desc: Use image node_id 6 for calling the TestModelbridgeUtils obj's underlying member method code with example usage: obj.test_pending_observations_as_array_list() without return types