code: def _validate_and_maybe_get_default_minimize(
      minimize: Optional[Union[bool, Tuple[bool, bool]]],
      objective_thresholds: List[ObjectiveThreshold],
      metric_names: Tuple[str, str],
      optimization_config: Optional[OptimizationConfig] = None,
  ) -> Optional[Tuple[bool, bool]]:
      if minimize is None:
          # Determine `minimize` defaults
          minimize = tuple(
              _maybe_get_default_minimize_single_metric(
                  metric_name=metric_name,
                  optimization_config=optimization_config,
                  objective_thresholds=objective_thresholds,
              )
              for metric_name in metric_names
          )
          # If either value of minimize is missing, return `None`
          if any(i_min is None for i_min in minimize):
              warnings.warn(
                  "Extraction of default `minimize` failed. Please specify `minimize` "
                  "of length 2 or provide an experiment whose `optimization_config` "
                  "includes 2 objectives. Returning None."
              )
              return None
          minimize = tuple(not_none(i_min) for i_min in minimize)
      # If only one bool provided, use for both dimensions
      elif isinstance(minimize, bool):
          minimize = (minimize, minimize)
      if len(minimize) != 2:
          warnings.warn(
              f"Expected 2-dimensional `minimize` but got {len(minimize)} dimensions: "
              f"{minimize}. Please specify `minimize` of length 2 or provide an "
              "experiment whose `optimization_config` includes 2 objectives. Returning "
              "None."
          )
          return None
  
      return minimize
  
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 16 for calling a global function with example usage: _validate_and_maybe_get_default_minimize(minimize, objective_thresholds, metric_names, optimization_config) and returns: minimize, None, None