code: def plot_multiple_metrics(
      model: ModelBridge,
      metric_x: str,
      metric_y: str,
      generator_runs_dict: TNullableGeneratorRunsDict = None,
      rel_x: bool = True,
      rel_y: bool = True,
      fixed_features: Optional[ObservationFeatures] = None,
      data_selector: Optional[Callable[[Observation], bool]] = None,
      color_parameter: Optional[str] = None,
      color_metric: Optional[str] = None,
      **kwargs: Any,
  ) -> AxPlotConfig:
      """Plot raw values or predictions of two metrics for arms.
  
      All arms used in the model are included in the plot. Additional
      arms can be passed through the `generator_runs_dict` argument.
  
      Args:
          model: model to draw predictions from.
          metric_x: metric to plot on the x-axis.
          metric_y: metric to plot on the y-axis.
          generator_runs_dict: a mapping from
              generator run name to generator run.
          rel_x: if True, use relative effects on metric_x.
          rel_y: if True, use relative effects on metric_y.
          data_selector: Function for selecting observations for plotting.
          color_parameter: color points according to the specified parameter,
              cannot be used together with color_metric.
          color_metric: color points according to the specified metric,
              cannot be used together with color_parameter.
      """
      if color_parameter or color_metric:
          layout_offset_x = 0.15
      else:
          layout_offset_x = 0
      rel = checked_cast_optional(bool, kwargs.get("rel"))
      if rel is not None:
          warnings.warn(
              "Use `rel_x` and `rel_y` instead of `rel`.",
              DeprecationWarning,
              stacklevel=2,
          )
          rel_x = rel
          rel_y = rel
      traces = _multiple_metric_traces(
          model,
          metric_x,
          metric_y,
          generator_runs_dict,
          rel_x=rel_x,
          rel_y=rel_y,
          fixed_features=fixed_features,
          data_selector=data_selector,
          color_parameter=color_parameter,
          color_metric=color_metric,
      )
      num_cand_traces = (
          len(generator_runs_dict)
          if generator_runs_dict is not None
          else 0
      )
      layout = go.Layout(
          title="Objective Tradeoffs",
          hovermode="closest",
          updatemenus=[
              {
                  "x": 1.25 + layout_offset_x,
                  "y": 0.67,
                  "buttons": [
                      {
                          "args": [
                              {
                                  "error_x.width": 4,
                                  "error_x.thickness": 2,
                                  "error_y.width": 4,
                                  "error_y.thickness": 2,
                              }
                          ],
                          "label": "Yes",
                          "method": "restyle",
                      },
                      {
                          "args": [
                              {
                                  "error_x.width": 0,
                                  "error_x.thickness": 0,
                                  "error_y.width": 0,
                                  "error_y.thickness": 0,
                              }
                          ],
                          "label": "No",
                          "method": "restyle",
                      },
                  ],
                  "yanchor": "middle",
                  "xanchor": "left",
              },
              {
                  "x": 1.25 + layout_offset_x,
                  "y": 0.57,
                  "buttons": [
                      {
                          "args": [
                              {
                                  "visible": (
                                      [False, True]
                                      + [True] * num_cand_traces
                                  )
                              }
                          ],
                          "label": "Modeled",
                          "method": "restyle",
                      },
                      {
                          "args": [
                              {
                                  "visible": (
                                      [True, False]
                                      + [False] * num_cand_traces
                                  )
                              }
                          ],
                          "label": "Observed",
                          "method": "restyle",
                      },
                  ],
                  "yanchor": "middle",
                  "xanchor": "left",
              },
          ],
          annotations=[
              {
                  "x": 1.18 + layout_offset_x,
                  "y": 0.7,
                  "xref": "paper",
                  "yref": "paper",
                  "text": "Show CI",
                  "showarrow": False,
                  "yanchor": "middle",
              },
              {
                  "x": 1.18 + layout_offset_x,
                  "y": 0.6,
                  "xref": "paper",
                  "yref": "paper",
                  "text": "Type",
                  "showarrow": False,
                  "yanchor": "middle",
              },
          ],
          xaxis={
              "title": metric_x + (" (%)" if rel else ""),
              "zeroline": True,
              "zerolinecolor": "red",
          },
          yaxis={
              "title": metric_y + (" (%)" if rel else ""),
              "zeroline": True,
              "zerolinecolor": "red",
          },
          width=800,
          height=600,
          font={"size": 10},
          legend={"x": 1 + layout_offset_x},
      )
      fig = go.Figure(data=traces, layout=layout)
      return AxPlotConfig(data=fig, plot_type=AxPlotTypes.GENERIC)
  
imports: import numbers
  import warnings
  from collections import OrderedDict
  from logging import Logger
  from typing import Any, Callable, Dict, Iterable, List, Optional, Sequence, Tuple, Union
  import numpy
  import plotly.graph_objs
  from ax.core.data import Data
  from ax.core.experiment import Experiment
  from ax.core.observation import Observation, ObservationFeatures
  from ax.modelbridge.base import ModelBridge
  from ax.modelbridge.registry import Models
  from ax.plot.base import AxPlotConfig, AxPlotTypes, CI_OPACITY, DECIMALS, PlotInSampleArm, PlotMetric, PlotOutOfSampleArm, Z
  from ax.plot.color import BLUE_SCALE, COLORS, DISCRETE_COLOR_SCALE, rgba
  from ax.plot.helper import _format_CI, _format_dict, _wrap_metric, arm_name_to_sort_key, arm_name_to_tuple, get_plot_data, infer_is_relative, resize_subtitles, TNullableGeneratorRunsDict
  from ax.utils.common.logger import get_logger
  from ax.utils.common.typeutils import checked_cast_optional
  from ax.utils.stats.statstools import relativize
  from plotly import subplots
label_desc: Use image node_id 4 for calling a global function with example usage: plot_multiple_metrics(model, metric_x, metric_y, generator_runs_dict, rel_x, rel_y, fixed_features, data_selector, color_parameter, color_metric) and returns: AxPlotConfig