code: def optimization_trace_single_method(
      y: np.ndarray,
      optimum: Optional[float] = None,
      model_transitions: Optional[List[int]] = None,
      title: str = "",
      ylabel: str = "",
      hover_labels: Optional[List[str]] = None,
      trace_color: Tuple[int] = COLORS.STEELBLUE.value,
      optimum_color: Tuple[int] = COLORS.ORANGE.value,
      generator_change_color: Tuple[int] = COLORS.TEAL.value,
      optimization_direction: Optional[str] = "passthrough",
      plot_trial_points: bool = False,
      trial_points_color: Tuple[int] = COLORS.LIGHT_PURPLE.value,
      autoset_axis_limits: bool = True,
  ) -> AxPlotConfig:
      """Plots an optimization trace with mean and 2 SEMs
  
      Args:
          y: (r x t) array; result to plot, with r runs and t trials
          optimum: value of the optimal objective
          model_transitions: iterations, before which generators
              changed
          title: title for this plot.
          ylabel: label for the Y-axis.
          hover_labels: optional, text to show on hover; list where the i-th value
              corresponds to the i-th value in the value of the `y` argument.
          trace_color: tuple of 3 int values representing an RGB color for plotting
              running optimum. Defaults to blue.
          optimum_color: tuple of 3 int values representing an RGB color.
              Defaults to orange.
          generator_change_color: tuple of 3 int values representing
              an RGB color. Defaults to teal.
          optimization_direction: str, "minimize" will plot running minimum,
              "maximize" will plot running maximum, "passthrough" (default) will plot
              y as lines, None does not plot running optimum)
          plot_trial_points: bool, whether to plot the objective for each trial, as
              supplied in y (default False for backward compatibility)
          trial_points_color: tuple of 3 int values representing an RGB color for
              plotting trial points. Defaults to light purple.
          autoset_axis_limits: Automatically try to set the limit for each axis to focus
              on the region of interest.
  
      Returns:
          AxPlotConfig: plot of the optimization trace with IQR
      """
      return AxPlotConfig(
          data=optimization_trace_single_method_plotly(
              y=y,
              optimum=optimum,
              model_transitions=model_transitions,
              title=title,
              ylabel=ylabel,
              hover_labels=hover_labels,
              trace_color=trace_color,
              optimum_color=optimum_color,
              generator_change_color=generator_change_color,
              optimization_direction=optimization_direction,
              plot_trial_points=plot_trial_points,
              trial_points_color=trial_points_color,
              autoset_axis_limits=autoset_axis_limits,
          ),
          plot_type=AxPlotTypes.GENERIC,
      )
  
imports: from datetime import datetime, timedelta
  from typing import Any, Dict, List, Optional, Tuple, Union
  import numpy
  import pandas
  import plotly.graph_objs
  from ax.core.experiment import Experiment
  from ax.plot.base import AxPlotConfig, AxPlotTypes
  from ax.plot.color import COLORS, DISCRETE_COLOR_SCALE, rgba
  from ax.utils.common.timeutils import timestamps_in_range
  from ax.utils.common.typeutils import not_none
  from plotly import express
  from plotly.express.colors import sample_colorscale
label_desc: Use image node_id 10 for calling a global function with example usage: optimization_trace_single_method(y, optimum, model_transitions, title, ylabel, hover_labels, trace_color, optimum_color, generator_change_color, optimization_direction, plot_trial_points, trial_points_color, autoset_axis_limits) and returns: AxPlotConfig