code: def test_nonmonotonic_labels(
      n_classes, n_rows, n_cols, datatype, n_neighbors
  ):
      X, y = make_blobs(
          n_samples=n_rows,
          centers=n_classes,
          n_features=n_cols,
          cluster_std=0.01,
          random_state=0,
      )
  
      X = X.astype(np.float32)
  
      # Draw labels from non-monotonically increasing set
      classes = np.arange(0, n_classes * 5, 5)
      for i in range(n_classes):
          y[y == i] = classes[i]
  
      X_train, X_test, y_train, y_test = _build_train_test_data(
          X, y, datatype
      )
  
      knn_cu = cuKNN(n_neighbors=n_neighbors)
      knn_cu.fit(X_train, y_train)
  
      p = knn_cu.predict(X_test)
  
      if datatype == "dataframe":
          assert isinstance(p, cudf.Series)
          p = p.to_frame().to_numpy().reshape(p.shape[0])
          y_test = y_test.to_numpy().reshape(y_test.shape[0])
  
      assert array_equal(p.astype(np.int32), y_test.astype(np.int32))
  
file_path: cuml/python/cuml/tests/test_kneighbors_classifier.py
imports: from cuml.testing.utils import array_equal
  from cuml.internals.safe_imports import cpu_only_import
  from sklearn.datasets import make_blobs
  from sklearn.neighbors import KNeighborsClassifier
  from cuml.neighbors import KNeighborsClassifier
  import cuml
  import pytest
  from cuml.internals.safe_imports import gpu_only_import
label_desc: Use image node_id 8 for calling a global function with example usage: test_nonmonotonic_labels(n_classes, n_rows, n_cols, datatype, n_neighbors) without return types