code: def test_RaiseError(self) -> None:
      # set a wrong weights
      with self.assertRaises(ValueError):
          ScalarizedOutcomeConstraint(
              metrics=self.metrics,
              weights=[0.2, 0.8],
              op=ComparisonOp.LEQ,
              bound=self.bound,
          )
  
      with self.assertRaises(NotImplementedError):
          # pyre-fixme[7]: Expected `None` but got `Metric`.
          return self.constraint.metric
  
      with self.assertRaises(NotImplementedError):
          self.constraint.metric = self.metrics[0]
  
imports: from unittest import mock
  from ax.core.metric import Metric
  from ax.core.outcome_constraint import CONSTRAINT_WARNING_MESSAGE, LOWER_BOUND_MISMATCH, ObjectiveThreshold, OutcomeConstraint, ScalarizedOutcomeConstraint, UPPER_BOUND_MISMATCH
  from ax.core.types import ComparisonOp
  from ax.utils.common.testutils import TestCase
label_desc: Use image node_id 6 for calling the ScalarizedOutcomeConstraintTest obj's underlying member method code with example usage: obj.test_RaiseError() and returns: self