code: def test_TransformOptimizationConfig(self) -> None:
      # basic test
      m1 = Metric(name="m1")
      objective_m1 = Objective(metric=m1, minimize=False)
      oc = OptimizationConfig(
          objective=objective_m1, outcome_constraints=[]
      )
      tf = LogY(
          search_space=None,
          observations=self.observations,
          config={"metrics": ["m1"]},  # pyre-ignore
      )
      oc_tf = tf.transform_optimization_config(deepcopy(oc), None, None)
      self.assertEqual(oc_tf, oc)
      # output constraint on a different metric should work
      m2 = Metric(name="m2")
      oc = OptimizationConfig(
          objective=objective_m1,
          outcome_constraints=self.get_constraint(
              metric=m2, bound=-1, relative=False
          ),
      )
      oc_tf = tf.transform_optimization_config(deepcopy(oc), None, None)
      self.assertEqual(oc_tf, oc)
      # output constraint with a negative bound should fail
      objective_m2 = Objective(metric=m2, minimize=False)
      oc = OptimizationConfig(
          objective=objective_m2,
          outcome_constraints=self.get_constraint(
              metric=m1, bound=-1.234, relative=False
          ),
      )
      with self.assertRaises(ValueError) as cm:
          #  `None`.
          tf.transform_optimization_config(oc, None, None)
      self.assertEqual(
          "LogY transform cannot be applied to metric m1 since the "
          "bound isn't positive, got: -1.234.",
          str(cm.exception),
      )
      # output constraint with a zero bound should also fail
      oc = OptimizationConfig(
          objective=objective_m2,
          outcome_constraints=self.get_constraint(
              metric=m1, bound=0, relative=False
          ),
      )
      with self.assertRaises(ValueError) as cm:
          #  `None`.
          tf.transform_optimization_config(oc, None, None)
      self.assertEqual(
          "LogY transform cannot be applied to metric m1 since the "
          "bound isn't positive, got: 0.",
          str(cm.exception),
      )
      # output constraint with a positive bound should work
      oc = OptimizationConfig(
          objective=objective_m2,
          outcome_constraints=self.get_constraint(
              metric=m1, bound=2.345, relative=False
          ),
      )
      oc_tf = tf.transform_optimization_config(deepcopy(oc), None, None)
      oc.outcome_constraints[0].bound = math.log(2.345)
      self.assertEqual(oc_tf, oc)
      # output constraint with a relative bound should fail
      oc = OptimizationConfig(
          objective=objective_m2,
          outcome_constraints=self.get_constraint(
              metric=m1, bound=2.345, relative=True
          ),
      )
      with self.assertRaises(ValueError) as cm:
          #  `None`.
          tf.transform_optimization_config(oc, None, None)
      self.assertEqual(
          "LogY transform cannot be applied to metric m1 since it is "
          "subject to a relative constraint.",
          str(cm.exception),
      )
  
imports: import math
  from copy import deepcopy
  import numpy
  from ax.core.metric import Metric
  from ax.core.objective import MultiObjective, Objective
  from ax.core.observation import Observation, ObservationData, ObservationFeatures
  from ax.core.optimization_config import MultiObjectiveOptimizationConfig, OptimizationConfig
  from ax.core.outcome_constraint import ObjectiveThreshold, OutcomeConstraint
  from ax.core.types import ComparisonOp
  from ax.modelbridge.transforms.log_y import lognorm_to_norm, LogY, match_ci_width, norm_to_lognorm
  from ax.utils.common.testutils import TestCase
label_desc: Use image node_id 5 for calling the LogYTransformTest obj's underlying member method code with example usage: obj.test_TransformOptimizationConfig() without return types