code: def test_ScalarizedObjective(self) -> None:
      with self.assertRaises(NotImplementedError):
          # pyre-fixme[7]: Expected `None` but got `Metric`.
          return self.scalarized_objective.metric
  
      self.assertEqual(
          self.scalarized_objective.metrics,
          [self.metrics["m1"], self.metrics["m2"]],
      )
      weights = [
          mw[1] for mw in self.scalarized_objective.metric_weights
      ]
      self.assertEqual(weights, [1.0, 1.0])
      self.assertEqual(
          self.scalarized_objective.clone(), self.scalarized_objective
      )
      self.assertEqual(
          str(self.scalarized_objective),
          (
              "ScalarizedObjective(metric_names=['m1', 'm2'], weights=[1.0, 1.0], "
              "minimize=True)"
          ),
      )
      self.assertEqual(
          self.scalarized_objective.get_unconstrainable_metrics(),
          [self.metrics["m1"], self.metrics["m2"]],
      )
  
file_path: Ax/ax/core/tests/test_objective.py
imports: import warnings
  from ax.core.metric import Metric
  from ax.core.objective import MultiObjective, Objective, ScalarizedObjective
  from ax.utils.common.testutils import TestCase
label_desc: Use image node_id 5 for calling the ObjectiveTest obj's underlying member method code with example usage: obj.test_ScalarizedObjective() and returns: self