code: def test_NoiselessMerge(self) -> None:
      # One noiseless
      obsd = ObservationData(
          metric_names=["m1", "m2", "m2"],
          means=np.array([1.0, 2.0, 1.0]),
          covariance=np.array(
              [[1.0, 0.2, 0.4], [0.2, 2.0, 0.8], [0.4, 0.8, 0.0]]
          ),
      )
      obsd2 = ivw_metric_merge(obsd)
      np.array_equal(obsd2.means, np.array([1.0, 1.0]))
      cov_true = np.array([[1.0, 0.4], [0.4, 0.0]])
      self.assertTrue(np.array_equal(obsd2.covariance, cov_true))
      # Conflicting noiseless, default (warn)
      obsd = ObservationData(
          metric_names=["m1", "m2", "m2"],
          means=np.array([1.0, 2.0, 1.0]),
          covariance=np.array(
              [[1.0, 0.2, 0.4], [0.2, 0.0, 0.8], [0.4, 0.8, 0.0]]
          ),
      )
      with self.assertRaises(ValueError):
          obsd2 = ivw_metric_merge(obsd, conflicting_noiseless="wrong")
      obsd2 = ivw_metric_merge(obsd)
      self.assertTrue(np.array_equal(obsd2.means, np.array([1.0, 2.0])))
      cov_true = np.array([[1.0, 0.2], [0.2, 0.0]])
      self.assertTrue(np.array_equal(obsd2.covariance, cov_true))
      # Conflicting noiseless, raise
      with self.assertRaises(ValueError):
          obsd2 = ivw_metric_merge(obsd, conflicting_noiseless="raise")
  
file_path: Ax/ax/modelbridge/transforms/tests/test_ivw_transform.py
imports: import numpy
  from ax.core.observation import ObservationData
  from ax.modelbridge.transforms.ivw import IVW, ivw_metric_merge
  from ax.utils.common.testutils import TestCase
label_desc: Use image node_id 3 for calling the IVWTransformTest obj's underlying member method code with example usage: obj.test_NoiselessMerge() without return types