code: def interact_contour(
      model: ModelBridge,
      metric_name: str,
      generator_runs_dict: TNullableGeneratorRunsDict = None,
      relative: bool = False,
      density: int = 50,
      slice_values: Optional[Dict[str, Any]] = None,
      lower_is_better: bool = False,
      fixed_features: Optional[ObservationFeatures] = None,
      trial_index: Optional[int] = None,
  ) -> AxPlotConfig:
      """Create interactive plot with predictions for a 2-d slice of the parameter
      space.
  
      Args:
          model: ModelBridge that contains model for predictions
          metric_name: Name of metric to plot
          generator_runs_dict: A dictionary {name: generator run} of generator runs
              whose arms will be plotted, if they lie in the slice.
          relative: Predictions relative to status quo
          density: Number of points along slice to evaluate predictions.
          slice_values: A dictionary {name: val} for the fixed values of the
              other parameters. If not provided, then the status quo values will
              be used if there is a status quo, otherwise the mean of numeric
              parameters or the mode of choice parameters.
          lower_is_better: Lower values for metric are better.
          fixed_features: An ObservationFeatures object containing the values of
              features (including non-parameter features like context) to be set
              in the slice.
  
      Returns:
          AxPlotConfig: interactive plot of objective vs. parameters
      """
      return AxPlotConfig(
          data=interact_contour_plotly(
              model=model,
              metric_name=metric_name,
              generator_runs_dict=generator_runs_dict,
              relative=relative,
              density=density,
              slice_values=slice_values,
              lower_is_better=lower_is_better,
              fixed_features=fixed_features,
              trial_index=trial_index,
          ),
          plot_type=AxPlotTypes.GENERIC,
      )
  
file_path: Ax/ax/plot/contour.py
imports: import re
  from copy import deepcopy
  from typing import Any, Dict, Optional, Tuple
  import numpy
  import plotly.graph_objs
  from ax.core.observation import ObservationFeatures
  from ax.modelbridge.base import ModelBridge
  from ax.plot.base import AxPlotConfig, AxPlotTypes, PlotData
  from ax.plot.color import BLUE_SCALE, GREEN_PINK_SCALE, GREEN_SCALE
  from ax.plot.helper import axis_range, contour_config_to_trace, get_fixed_values, get_grid_for_parameter, get_plot_data, get_range_parameter, get_range_parameters, relativize_data, rgb, TNullableGeneratorRunsDict
label_desc: Use image node_id 6 for calling a global function with example usage: interact_contour(model, metric_name, generator_runs_dict, relative, density, slice_values, lower_is_better, fixed_features, trial_index) and returns: AxPlotConfig