code: def _maybe_get_default_minimize_single_metric(
      metric_name: str,
      objective_thresholds: List[ObjectiveThreshold],
      optimization_config: Optional[OptimizationConfig] = None,
  ) -> Optional[bool]:
      minimize = None
      # First try to get metric_name from optimization_config
      if (
          optimization_config is not None
          and metric_name in optimization_config.objective.metric_names
      ):
          if optimization_config.is_moo_problem:
              multi_objective = checked_cast(
                  MultiObjective, optimization_config.objective
              )
              for objective in multi_objective.objectives:
                  if objective.metric.name == metric_name:
                      return objective.minimize
          else:
              return optimization_config.objective.minimize
  
      # Next try to get minimize from objective_thresholds
      if objective_thresholds is not None:
          constraint_op_names = {
              objective_threshold.op.name
              for objective_threshold in objective_thresholds
          }
          invalid_constraint_op_names = (
              constraint_op_names - VALID_CONSTRAINT_OP_NAMES
          )
          if invalid_constraint_op_names:
              raise ValueError(
                  "Operators of all constraints must be in "
                  f"{VALID_CONSTRAINT_OP_NAMES}. Got {invalid_constraint_op_names}.)"
              )
          minimize = {
              objective_threshold.metric.name: objective_threshold.op.name
              == "LEQ"
              for objective_threshold in objective_thresholds
          }
          minimize = minimize.get(metric_name)
      if minimize is None:
          warnings.warn(
              f"Extraction of default `minimize` failed for metric {metric_name}. "
              f"Ensure {metric_name} is an objective of the provided experiment. "
              "Setting `minimize` to `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 17 for calling a global function with example usage: _maybe_get_default_minimize_single_metric(metric_name, objective_thresholds, optimization_config) and returns: minimize, optimization_config, objective