code: def test_ObservationData(self) -> None:
      attrs = {
          "metric_names": ["a", "b"],
          "means": np.array([4.0, 5.0]),
          "covariance": np.array([[1.0, 4.0], [3.0, 6.0]]),
      }
      # pyre-fixme[6]: For 1st param expected `List[str]` but got
      #  `Union[List[str], ndarray]`.
      # pyre-fixme[6]: For 1st param expected `ndarray` but got `Union[List[str],
      #  ndarray]`.
      obsd = ObservationData(**attrs)
      self.assertEqual(obsd.metric_names, attrs["metric_names"])
      self.assertTrue(np.array_equal(obsd.means, attrs["means"]))
      self.assertTrue(
          np.array_equal(obsd.covariance, attrs["covariance"])
      )
      # use legacy printing for numpy (<= 1.13 add spaces in front of floats;
      # to get around tests failing on older versions, peg version to 1.13)
      if np.__version__ >= "1.14":
          np.set_printoptions(legacy="1.13")
      printstr = (
          "ObservationData(metric_names=['a', 'b'], means=[ 4.  5.], "
      )
      printstr += "covariance=[[ 1.  4.]\n [ 3.  6.]])"
      self.assertEqual(repr(obsd), printstr)
      self.assertEqual(obsd.means_dict, {"a": 4.0, "b": 5.0})
      self.assertEqual(
          obsd.covariance_matrix,
          {"a": {"a": 1.0, "b": 4.0}, "b": {"a": 3.0, "b": 6.0}},
      )
  
imports: import json
  from unittest.mock import Mock, PropertyMock
  import numpy
  import pandas
  from ax.core.arm import Arm
  from ax.core.base_trial import TrialStatus
  from ax.core.batch_trial import BatchTrial
  from ax.core.data import Data
  from ax.core.generator_run import GeneratorRun
  from ax.core.map_data import MapData, MapKeyInfo
  from ax.core.observation import Observation, ObservationData, ObservationFeatures, observations_from_data, observations_from_map_data, recombine_observations, separate_observations
  from ax.core.trial import Trial
  from ax.utils.common.testutils import TestCase
label_desc: Use image node_id 5 for calling the ObservationsTest obj's underlying member method code with example usage: obj.test_ObservationData() without return types