code: def setUp(self) -> None:
      self.metric_task_map = {
          "metric1": ["metric2", "metric3"],
          "metric2": ["metric3"],
      }
      self.observations = [
          Observation(
              data=ObservationData(
                  metric_names=["metric1", "metric2", "metric3"],
                  means=np.array([1.0, 2.0, 3.0]),
                  covariance=np.diag([1.0, 2.0, 3.0]),
              ),
              features=ObservationFeatures(
                  parameters={"x": 5.0, "y": 2.0}
              ),
              arm_name="0_0",
          ),
          Observation(
              data=ObservationData(
                  metric_names=["metric3"],
                  means=np.array([30.0]),
                  covariance=np.array([[30.0]]),
              ),
              features=ObservationFeatures(
                  parameters={"x": 10.0, "y": 4.0}
              ),
          ),
      ]
      self.search_space = get_search_space_for_range_values(
          min=0.0, max=20.0
      )
      self.expected_new_observations = [
          Observation(
              data=ObservationData(
                  metric_names=["metric1", "metric2", "metric3"],
                  means=np.array([1.0, 2.0, 3.0]),
                  covariance=np.diag([1.0, 2.0, 3.0]),
              ),
              features=ObservationFeatures(
                  parameters={
                      "x": 5.0,
                      "y": 2.0,
                      "METRIC_TASK": "TARGET",
                  }
              ),
              arm_name="0_0",
          ),
          Observation(
              data=ObservationData(
                  metric_names=["metric2", "metric3"],
                  means=np.array([1.0, 1.0]),
                  covariance=np.diag([1.0, 1.0]),
              ),
              features=ObservationFeatures(
                  parameters={
                      "x": 5.0,
                      "y": 2.0,
                      "METRIC_TASK": "metric1",
                  }
              ),
              arm_name="0_0",
          ),
          Observation(
              data=ObservationData(
                  metric_names=["metric3"],
                  means=np.array([2.0]),
                  covariance=np.array([[2.0]]),
              ),
              features=ObservationFeatures(
                  parameters={
                      "x": 5.0,
                      "y": 2.0,
                      "METRIC_TASK": "metric2",
                  }
              ),
              arm_name="0_0",
          ),
          Observation(
              data=ObservationData(
                  metric_names=["metric3"],
                  means=np.array([30.0]),
                  covariance=np.array([[30.0]]),
              ),
              features=ObservationFeatures(
                  parameters={
                      "x": 10.0,
                      "y": 4.0,
                      "METRIC_TASK": "TARGET",
                  }
              ),
          ),
      ]
      self.t = MetricsAsTask(
          search_space=self.search_space,
          observations=self.observations,
          config={"metric_task_map": self.metric_task_map},
      )
  
file_path: Ax/ax/modelbridge/transforms/tests/test_metrics_as_task_transform.py
imports: from copy import deepcopy
  import numpy
  from ax.core.observation import Observation, ObservationData, ObservationFeatures
  from ax.core.parameter import ChoiceParameter
  from ax.modelbridge.transforms.metrics_as_task import MetricsAsTask
  from ax.utils.common.testutils import TestCase
  from ax.utils.testing.core_stubs import get_search_space_for_range_values
label_desc: Use image node_id 1 for calling the MetricsAsTaskTransformTest obj's underlying member method code with example usage: obj.setUp() without return types