code: def _get_contour_plot(info: _ContourInfo) -> "go.Figure":
      layout = go.Layout(title="Contour Plot")
  
      sorted_params = info.sorted_params
      sub_plot_infos = info.sub_plot_infos
      reverse_scale = info.reverse_scale
      target_name = info.target_name
  
      if len(sorted_params) <= 1:
          return go.Figure(data=[], layout=layout)
  
      if len(sorted_params) == 2:
          x_param = sorted_params[0]
          y_param = sorted_params[1]
          sub_plot_info = sub_plot_infos[0][0]
          sub_plots = _get_contour_subplot(
              sub_plot_info, reverse_scale, target_name
          )
          figure = go.Figure(data=sub_plots, layout=layout)
          figure.update_xaxes(
              title_text=x_param, range=sub_plot_info.xaxis.range
          )
          figure.update_yaxes(
              title_text=y_param, range=sub_plot_info.yaxis.range
          )
  
          if sub_plot_info.xaxis.is_cat:
              figure.update_xaxes(type="category")
          if sub_plot_info.yaxis.is_cat:
              figure.update_yaxes(type="category")
  
          if sub_plot_info.xaxis.is_log:
              log_range = [
                  math.log10(p) for p in sub_plot_info.xaxis.range
              ]
              figure.update_xaxes(range=log_range, type="log")
          if sub_plot_info.yaxis.is_log:
              log_range = [
                  math.log10(p) for p in sub_plot_info.yaxis.range
              ]
              figure.update_yaxes(range=log_range, type="log")
      else:
          figure = make_subplots(
              rows=len(sorted_params),
              cols=len(sorted_params),
              shared_xaxes=True,
              shared_yaxes=True,
          )
          figure.update_layout(layout)
          showscale = (
              True  # showscale option only needs to be specified once.
          )
          for x_i, x_param in enumerate(sorted_params):
              for y_i, y_param in enumerate(sorted_params):
                  if x_param == y_param:
                      figure.add_trace(
                          go.Scatter(), row=y_i + 1, col=x_i + 1
                      )
                  else:
                      sub_plots = _get_contour_subplot(
                          sub_plot_infos[y_i][x_i],
                          reverse_scale,
                          target_name,
                      )
                      contour = sub_plots[0]
                      scatter = sub_plots[1]
                      contour.update(
                          showscale=showscale
                      )  # showscale's default is True.
                      if showscale:
                          showscale = False
                      figure.add_trace(
                          contour, row=y_i + 1, col=x_i + 1
                      )
                      figure.add_trace(
                          scatter, row=y_i + 1, col=x_i + 1
                      )
  
                  xaxis = sub_plot_infos[y_i][x_i].xaxis
                  yaxis = sub_plot_infos[y_i][x_i].yaxis
                  figure.update_xaxes(
                      range=xaxis.range, row=y_i + 1, col=x_i + 1
                  )
                  figure.update_yaxes(
                      range=yaxis.range, row=y_i + 1, col=x_i + 1
                  )
  
                  if xaxis.is_cat:
                      figure.update_xaxes(
                          type="category", row=y_i + 1, col=x_i + 1
                      )
                  if yaxis.is_cat:
                      figure.update_yaxes(
                          type="category", row=y_i + 1, col=x_i + 1
                      )
  
                  if xaxis.is_log:
                      log_range = [math.log10(p) for p in xaxis.range]
                      figure.update_xaxes(
                          range=log_range,
                          type="log",
                          row=y_i + 1,
                          col=x_i + 1,
                      )
                  if yaxis.is_log:
                      log_range = [math.log10(p) for p in yaxis.range]
                      figure.update_yaxes(
                          range=log_range,
                          type="log",
                          row=y_i + 1,
                          col=x_i + 1,
                      )
  
                  if x_i == 0:
                      figure.update_yaxes(
                          title_text=y_param, row=y_i + 1, col=x_i + 1
                      )
                  if y_i == len(sorted_params) - 1:
                      figure.update_xaxes(
                          title_text=x_param, row=y_i + 1, col=x_i + 1
                      )
  
      return figure
  
imports: from __future__ import annotations
  import math
  from typing import Any
  from typing import Callable
  from typing import NamedTuple
  from optuna.logging import get_logger
  from optuna.samplers._base import _CONSTRAINTS_KEY
  from optuna.study import Study
  from optuna.study import StudyDirection
  from optuna.trial import FrozenTrial
  from optuna.trial import TrialState
  from optuna.visualization._plotly_imports import _imports
  from optuna.visualization._utils import _check_plot_args
  from optuna.visualization._utils import _filter_nonfinite
  from optuna.visualization._utils import _is_log_scale
  from optuna.visualization._utils import _is_numerical
  from optuna.visualization._utils import _is_reverse_scale
label_desc: Use image node_id 2 for calling a global function with example usage: _get_contour_plot(info) and returns: figure, go