code: def _get_rank_plot(
      info: _RankPlotInfo,
  ) -> "Axes":
      params = info.params
      sub_plot_infos = info.sub_plot_infos
  
      plt.style.use(
          "ggplot"
      )  # Use ggplot style sheet for similar outputs to plotly.
  
      title = f"Rank ({info.target_name})"
  
      n_params = len(params)
      if n_params == 0:
          _, ax = plt.subplots()
          ax.set_title(title)
          return ax
      if n_params == 1 or n_params == 2:
          fig, axs = plt.subplots()
          axs.set_title(title)
          pc = _add_rank_subplot(axs, sub_plot_infos[0][0])
      else:
          fig, axs = plt.subplots(n_params, n_params)
          fig.suptitle(title)
  
          for x_i in range(n_params):
              for y_i in range(n_params):
                  ax = axs[x_i, y_i]
                  # Set the x or y label only if the subplot is in the edge of the overall figure.
                  pc = _add_rank_subplot(
                      ax,
                      sub_plot_infos[x_i][y_i],
                      set_x_label=x_i == (n_params - 1),
                      set_y_label=y_i == 0,
                  )
  
      tick_info = _get_tick_info(info.zs)
  
      pc.set_cmap(plt.get_cmap("RdYlBu_r"))
      cbar = fig.colorbar(pc, ax=axs, ticks=tick_info.coloridxs)
      cbar.ax.set_yticklabels(tick_info.text)
      cbar.outline.set_edgecolor("gray")
      return axs
  
file_path: optuna/optuna/visualization/matplotlib/_rank.py
imports: from __future__ import annotations
  from typing import Callable
  from optuna._experimental import experimental_func
  from optuna.logging import get_logger
  from optuna.study import Study
  from optuna.trial import FrozenTrial
  from optuna.visualization._rank import _get_rank_info
  from optuna.visualization._rank import _get_tick_info
  from optuna.visualization._rank import _RankPlotInfo
  from optuna.visualization._rank import _RankSubplotInfo
  from optuna.visualization.matplotlib._matplotlib_imports import _imports
label_desc: Use image node_id 2 for calling a global function with example usage: _get_rank_plot(info) and returns: axs, ax