code: def _validate_experiment_and_maybe_get_objective_thresholds(
      optimization_config: Optional[OptimizationConfig],
      metric_names: Tuple[str, str],
      reference_point: Optional[Tuple[float, float]],
  ) -> List[ObjectiveThreshold]:
      objective_thresholds = []
      # Validate `objective_thresholds` if `reference_point` is unspecified.
      if reference_point is None:
          objective_thresholds = checked_cast(
              MultiObjectiveOptimizationConfig, optimization_config
          ).objective_thresholds
          if any(
              ot.relative
              for ot in objective_thresholds
              if ot.metric.name in metric_names
          ):
              raise NotImplementedError(
                  "Pareto plotting not supported for experiments with relative objective "
                  "thresholds."
              )
          constraint_metric_names = {
              objective_threshold.metric.name
              for objective_threshold in objective_thresholds
          }
          missing_metric_names = set(metric_names) - set(
              constraint_metric_names
          )
          if missing_metric_names:
              warnings.warn(
                  "For automatic inference of reference point, expected one "
                  "`objective_threshold` for each metric in `metric_names`: "
                  f"{metric_names}. Missing {missing_metric_names}. Got "
                  f"{len(objective_thresholds)}: {objective_thresholds}. "
                  "Please specify `reference_point` or provide "
                  "an experiment whose `optimization_config` contains one "
                  "objective threshold for each metric. Returning an empty list."
              )
  
      return objective_thresholds
  
imports: import warnings
  from typing import Dict, Iterable, List, Optional, Tuple, Union
  import numpy
  import pandas
  import plotly.graph_objs
  from ax.core.experiment import Experiment
  from ax.core.objective import MultiObjective
  from ax.core.optimization_config import MultiObjectiveOptimizationConfig, OptimizationConfig
  from ax.core.outcome_constraint import ObjectiveThreshold
  from ax.exceptions.core import UserInputError
  from ax.plot.base import AxPlotConfig, AxPlotTypes, CI_OPACITY, DECIMALS
  from ax.plot.color import COLORS, DISCRETE_COLOR_SCALE, rgba
  from ax.plot.helper import _format_CI, _format_dict, extend_range
  from ax.plot.pareto_utils import ParetoFrontierResults
  from ax.service.utils.best_point_mixin import BestPointMixin
  from ax.utils.common.typeutils import checked_cast, not_none
  from plotly import express
  from scipy.stats import norm
label_desc: Use image node_id 14 for calling a global function with example usage: _validate_experiment_and_maybe_get_objective_thresholds(optimization_config, metric_names, reference_point) and returns: objective_thresholds