code: def _get_categorical_plot_values(
      subplot_info: _SliceSubplotInfo, values: _PlotValues
  ) -> tuple[list[Any], list[float], list[int]]:
      assert subplot_info.x_labels is not None
      value_x = []
      value_y = []
      value_c = []
      points_dict = defaultdict(list)
      for x, y, number in zip(values.x, values.y, values.trial_numbers):
          points_dict[x].append((y, number))
      for x_label in subplot_info.x_labels:
          for y, number in points_dict[x_label]:
              value_x.append(str(x_label))
              value_y.append(y)
              value_c.append(number)
      return value_x, value_y, value_c
  
file_path: optuna/optuna/visualization/matplotlib/_slice.py
imports: from __future__ import annotations
  from collections import defaultdict
  import math
  from typing import Any
  from typing import Callable
  from optuna._experimental import experimental_func
  from optuna.study import Study
  from optuna.trial import FrozenTrial
  from optuna.visualization._slice import _get_slice_plot_info
  from optuna.visualization._slice import _PlotValues
  from optuna.visualization._slice import _SlicePlotInfo
  from optuna.visualization._slice import _SliceSubplotInfo
  from optuna.visualization.matplotlib._matplotlib_imports import _imports
label_desc: Use image node_id 4 for calling a global function with example usage: _get_categorical_plot_values(subplot_info, values) and returns: value_x,  value_y,  value_c