code: def build_multiclass_ranking_dataset(
      X, y, cat_features, label_values=[0, 1], start_group_id=0
  ):
      ranking_matrix = []
      ranking_labels = []
      group_ids = []
      X_train_matrix = X.values
      y_train_vector = y.values
      for obj_idx in range(X.shape[0]):
          obj = list(X_train_matrix[obj_idx])
          for label in label_values:
              obj_of_given_class = deepcopy(obj)
              obj_of_given_class.append(label)
              ranking_matrix.append(obj_of_given_class)
              ranking_labels.append(
                  float(y_train_vector[obj_idx] == label)
              )
              group_ids.append(start_group_id + obj_idx)
      final_cat_features = deepcopy(cat_features)
      final_cat_features.append(
          X.shape[1]
      )  # new feature that we are adding should be categorical.
      return Pool(
          ranking_matrix,
          ranking_labels,
          cat_features=final_cat_features,
          group_id=group_ids,
      )
  
file_path: catboost/catboost/pytest/smoke_tests/classification_tutorial_cpu.py
imports: import os
  import pandas
  import os
  import numpy
  from sklearn.model_selection import train_test_split
  import sklearn
  from sklearn import metrics
  import matplotlib.pyplot
  from numpy import exp
  from copy import deepcopy
  import math
  import shap
  import shap
label_desc: Use image node_id 1 for calling a global function with example usage: build_multiclass_ranking_dataset(X, y, cat_features, label_values, start_group_id) and returns: Pool