code: def _get_contour_subplot(
      info: _SubContourInfo,
      reverse_scale: bool,
      target_name: str = "Objective Value",
  ) -> tuple["Contour", "Scatter", "Scatter"]:
      x_indices = info.xaxis.indices
      y_indices = info.yaxis.indices
  
      feasible = _PlotValues([], [])
      infeasible = _PlotValues([], [])
  
      for x_value, y_value, c in zip(
          info.xaxis.values, info.yaxis.values, info.constraints
      ):
          if x_value is not None and y_value is not None:
              if c:
                  feasible.x.append(x_value)
                  feasible.y.append(y_value)
              else:
                  infeasible.x.append(x_value)
                  infeasible.y.append(y_value)
  
      z_values = [
          [float("nan") for _ in range(len(info.xaxis.indices))]
          for _ in range(len(info.yaxis.indices))
      ]
      for (x_i, y_i), z_value in info.z_values.items():
          z_values[y_i][x_i] = z_value
  
      if len(x_indices) < 2 or len(y_indices) < 2:
          return go.Contour(), go.Scatter(), go.Scatter()
  
      contour = go.Contour(
          x=x_indices,
          y=y_indices,
          z=z_values,
          colorbar={"title": target_name},
          colorscale=COLOR_SCALE,
          connectgaps=True,
          contours_coloring="heatmap",
          hoverinfo="none",
          line_smoothing=1.3,
          reversescale=reverse_scale,
      )
  
      return (
          contour,
          _create_scatter(feasible.x, feasible.y, is_feasible=True),
          _create_scatter(
              infeasible.x, infeasible.y, is_feasible=False
          ),
      )
  
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 3 for calling a global function with example usage: _get_contour_subplot(info, reverse_scale, target_name) and returns: contour,  _create_scatter,  _create_scatter, go,  go,  go