code: def _validate_outcome_constraints(
      outcome_constraints: List[OutcomeConstraint],
      primary_objective: Metric,
      secondary_objective: Metric,
  ) -> None:
      """Validate that outcome constraints don't involve objectives."""
      objective_metrics = [
          primary_objective.name,
          secondary_objective.name,
      ]
      if outcome_constraints is not None:
          for oc in outcome_constraints:
              if oc.metric.name in objective_metrics:
                  raise ValueError(
                      "Metric `{metric_name}` occurs in both outcome constraints "
                      "and objectives".format(
                          metric_name=oc.metric.name
                      )
                  )
  
imports: import copy
  from copy import deepcopy
  from itertools import combinations
  from logging import Logger
  from typing import cast, Dict, List, NamedTuple, Optional, Tuple, Union
  import numpy
  import torch
  from ax.core.batch_trial import BatchTrial
  from ax.core.data import Data
  from ax.core.experiment import Experiment
  from ax.core.metric import Metric
  from ax.core.objective import ScalarizedObjective
  from ax.core.observation import ObservationFeatures
  from ax.core.optimization_config import MultiObjectiveOptimizationConfig, OptimizationConfig
  from ax.core.outcome_constraint import ComparisonOp, ObjectiveThreshold, OutcomeConstraint
  from ax.core.search_space import RobustSearchSpace, SearchSpace
  from ax.core.types import TParameterization
  from ax.exceptions.core import AxError, UnsupportedError, UserInputError
  from ax.modelbridge.modelbridge_utils import _get_modelbridge_training_data, get_pareto_frontier_and_configs, observed_pareto_frontier
  from ax.modelbridge.registry import Models
  from ax.modelbridge.torch import TorchModelBridge
  from ax.modelbridge.transforms.search_space_to_float import SearchSpaceToFloat
  from ax.models.torch.posterior_mean import get_PosteriorMean
  from ax.models.torch_base import TorchModel
  from ax.utils.common.logger import get_logger
  from ax.utils.stats.statstools import relativize
  from botorch.utils.multi_objective import is_non_dominated
  from botorch.utils.multi_objective.hypervolume import infer_reference_point
label_desc: Use image node_id 9 for calling a global function with example usage: _validate_outcome_constraints(outcome_constraints, primary_objective, secondary_objective) without return types