code: def _generate_contour_subplot(
      info: _SubContourInfo, ax: "Axes", cmap: "Colormap"
  ) -> "ContourSet":
      if len(info.xaxis.indices) < 2 or len(info.yaxis.indices) < 2:
          ax.label_outer()
          return ax
  
      ax.set(xlabel=info.xaxis.name, ylabel=info.yaxis.name)
      ax.set_xlim(info.xaxis.range[0], info.xaxis.range[1])
      ax.set_ylim(info.yaxis.range[0], info.yaxis.range[1])
  
      if info.xaxis.name == info.yaxis.name:
          ax.label_outer()
          return ax
  
      (
          xi,
          yi,
          zi,
          x_cat_param_pos,
          x_cat_param_label,
          y_cat_param_pos,
          y_cat_param_label,
          feasible_plot_values,
          infeasible_plot_values,
      ) = _calculate_griddata(info)
      cs = None
      if len(zi) > 0:
          if info.xaxis.is_log:
              ax.set_xscale("log")
          if info.yaxis.is_log:
              ax.set_yscale("log")
          if info.xaxis.name != info.yaxis.name:
              # Contour the gridded data.
              ax.contour(xi, yi, zi, 15, linewidths=0.5, colors="k")
              cs = ax.contourf(xi, yi, zi, 15, cmap=cmap.reversed())
              # Plot data points.
              ax.scatter(
                  feasible_plot_values.x,
                  feasible_plot_values.y,
                  marker="o",
                  c="black",
                  s=20,
                  edgecolors="grey",
                  linewidth=2.0,
              )
              ax.scatter(
                  infeasible_plot_values.x,
                  infeasible_plot_values.y,
                  marker="o",
                  c="#cccccc",
                  s=20,
                  edgecolors="grey",
                  linewidth=2.0,
              )
  
      if info.xaxis.is_cat:
          ax.set_xticks(x_cat_param_pos)
          ax.set_xticklabels(x_cat_param_label)
      if info.yaxis.is_cat:
          ax.set_yticks(y_cat_param_pos)
          ax.set_yticklabels(y_cat_param_label)
      ax.label_outer()
      return cs
  
imports: from __future__ import annotations
  from typing import Callable
  from typing import Sequence
  import numpy
  from optuna._experimental import experimental_func
  from optuna._imports import try_import
  from optuna.logging import get_logger
  from optuna.study import Study
  from optuna.trial import FrozenTrial
  from optuna.visualization._contour import _AxisInfo
  from optuna.visualization._contour import _ContourInfo
  from optuna.visualization._contour import _get_contour_info
  from optuna.visualization._contour import _PlotValues
  from optuna.visualization._contour import _SubContourInfo
  from optuna.visualization.matplotlib._matplotlib_imports import _imports
label_desc: Use image node_id 5 for calling a global function with example usage: _generate_contour_subplot(info, ax, cmap) and returns: cs, ax, ax