def transform_optimization_config(self, optimization_config: OptimizationConfig, modelbridge: Optional[modelbridge_module.base.ModelBridge], fixed_features: ObservationFeatures) -> OptimizationConfig:
    for c in optimization_config.all_constraints:
        if isinstance(c, ScalarizedOutcomeConstraint):
            c_metric_names = [metric.name for metric in c.metrics]
            intersection = (set(c_metric_names) & set(self.metric_names))
            if intersection:
                raise NotImplementedError(f'PowerTransformY cannot be used for metric(s) {intersection} that are part of a ScalarizedOutcomeConstraint.')
        elif (c.metric.name in self.metric_names):
            if c.relative:
                raise ValueError(f'PowerTransformY cannot be applied to metric {c.metric.name} since it is subject to a relative constraint.')
            else:
                transform = self.power_transforms[c.metric.name].transform
                c.bound = transform(np.array(c.bound, ndmin=2)).item()
    return optimization_config
def transform_optimization_config(self, optimization_config: OptimizationConfig, modelbridge: Optional[modelbridge_module.base.ModelBridge], fixed_features: ObservationFeatures) -> OptimizationConfig:
    for c in optimization_config.all_constraints:
        if isinstance(c, ScalarizedOutcomeConstraint):
            c_metric_names = [metric.name for metric in c.metrics]
            intersection = (set(c_metric_names) & set(self.metric_names))
            if intersection:
                raise NotImplementedError(f'PowerTransformY cannot be used for metric(s) {intersection} that are part of a ScalarizedOutcomeConstraint.')
        elif (c.metric.name in self.metric_names):
            if c.relative:
                raise ValueError(f'PowerTransformY cannot be applied to metric {c.metric.name} since it is subject to a relative constraint.')
            else:
                transform = self.power_transforms[c.metric.name].transform
                c.bound = transform(np.array(c.bound, ndmin=2)).item()
    return optimization_config