code: def test_relabeling(n_samples, n_classes):
      """
      Tests whether the internal relabeling works properly. For example, if the labels provided were `[40, 51]`,
      internally, we relabel them as `[0, 1]`.
      """
  
      X, y = make_classification(
          n_samples=n_samples,
          n_features=n_classes,
          n_informative=n_classes,
          n_redundant=0,
          n_repeated=0,
          n_classes=n_classes,
          n_clusters_per_class=1,
          class_sep=10,
          random_state=0,
      )
  
      # define summariser and obtain summary
      summariser = ProtoSelect(
          kernel_distance=EuclideanDistance(), eps=0.5
      )
      summariser = summariser.fit(X=X, y=y)
      summary = summariser.summarise(
          num_prototypes=np.random.randint(1, n_samples, 1).item()
      )
  
      # check internal Y_ref relabeling
      provided_labels = np.unique(y)
      internal_labels = np.unique(summariser.y)
      assert np.array_equal(
          internal_labels, np.arange(len(provided_labels))
      )
  
      # check if the prototypes labels are labels with the provided labels
      assert np.all(
          np.isin(
              np.unique(summary.data["prototype_labels"]),
              provided_labels,
          )
      )
  
imports: from copy import deepcopy
  import matplotlib
  import numpy
  import pytest
  from sklearn.datasets import make_classification
  from sklearn.model_selection import train_test_split
  from alibi.api.defaults import DEFAULT_DATA_PROTOSELECT, DEFAULT_META_PROTOSELECT
  from alibi.api.interfaces import Explanation
  from alibi.prototypes import ProtoSelect
  from alibi.prototypes.protoselect import _batch_preprocessing, _imscatterplot, compute_prototype_importances, cv_protoselect_euclidean, visualize_image_prototypes
  from alibi.utils.kernel import EuclideanDistance
label_desc: Use image node_id 3 for calling a global function with example usage: test_relabeling(n_samples, n_classes) without return types