code: def _get_contour_info(
      study: Study,
      params: list[str] | None = None,
      target: Callable[[FrozenTrial], float] | None = None,
      target_name: str = "Objective Value",
  ) -> _ContourInfo:
      _check_plot_args(study, target, target_name)
  
      trials = _filter_nonfinite(
          study.get_trials(
              deepcopy=False, states=(TrialState.COMPLETE,)
          ),
          target=target,
      )
  
      all_params = {
          p_name for t in trials for p_name in t.params.keys()
      }
      if len(trials) == 0:
          _logger.warning(
              "Your study does not have any completed trials."
          )
          sorted_params = []
      elif params is None:
          sorted_params = sorted(all_params)
      else:
          if len(params) <= 1:
              _logger.warning(
                  "The length of params must be greater than 1."
              )
  
          for input_p_name in params:
              if input_p_name not in all_params:
                  raise ValueError(
                      "Parameter {} does not exist in your study.".format(
                          input_p_name
                      )
                  )
          sorted_params = sorted(set(params))
  
      sub_plot_infos: list[list[_SubContourInfo]]
      if len(sorted_params) == 2:
          x_param = sorted_params[0]
          y_param = sorted_params[1]
          sub_plot_info = _get_contour_subplot_info(
              study, trials, x_param, y_param, target
          )
          sub_plot_infos = [[sub_plot_info]]
      else:
          sub_plot_infos = []
          for i, y_param in enumerate(sorted_params):
              sub_plot_infos.append([])
              for x_param in sorted_params:
                  sub_plot_info = _get_contour_subplot_info(
                      study, trials, x_param, y_param, target
                  )
                  sub_plot_infos[i].append(sub_plot_info)
  
      reverse_scale = _is_reverse_scale(study, target)
  
      return _ContourInfo(
          sorted_params=sorted_params,
          sub_plot_infos=sub_plot_infos,
          reverse_scale=reverse_scale,
          target_name=target_name,
      )
  
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 5 for calling a global function with example usage: _get_contour_info(study, params, target, target_name) and returns: _ContourInfo