code: def test_knn_x_none(input_type, nrows, n_feats, k, metric):
      X, _ = make_blobs(
          n_samples=nrows, n_features=n_feats, random_state=0
      )
  
      p = 5  # Testing 5-norm of the minkowski metric only
      knn_sk = skKNN(metric=metric, p=p)  # Testing
      knn_sk.fit(X.get())
      D_sk, I_sk = knn_sk.kneighbors(X=None, n_neighbors=k)
  
      X_orig = X
  
      if input_type == "dataframe":
          X = cudf.DataFrame(X)
  
      knn_cu = cuKNN(metric=metric, p=p, output_type="numpy")
      knn_cu.fit(X)
      D_cuml, I_cuml = knn_cu.kneighbors(X=None, n_neighbors=k)
  
      # Assert the cuml model was properly reverted
      cp.testing.assert_allclose(
          knn_cu._fit_X, X_orig, atol=1e-5, rtol=1e-4
      )
  
      # Allow a max relative diff of 10% and absolute diff of 1%
      cp.testing.assert_allclose(D_cuml, D_sk, atol=5e-2, rtol=1e-1)
      assert I_cuml.all() == I_sk.all()
  
imports: import gc
  from cuml.common import has_scipy
  import cuml
  import sklearn
  from cuml.internals.safe_imports import cpu_only_import_from
  from numpy.testing import assert_array_equal, assert_allclose
  from cuml.internals.safe_imports import cpu_only_import
  import pytest
  import math
  from cuml.testing.utils import array_equal, unit_param, quality_param, stress_param
  from cuml.neighbors import NearestNeighbors
  from sklearn.neighbors import NearestNeighbors
  from cuml.datasets import make_blobs
  from sklearn.metrics import pairwise_distances
  from cuml.metrics import pairwise_distances
  from cuml.internals import logger
  from cuml.internals.safe_imports import gpu_only_import
label_desc: Use image node_id 12 for calling a global function with example usage: test_knn_x_none(input_type, nrows, n_feats, k, metric) without return types