code: def test_ann_distances_metrics(algo, metric):
      X, y = make_blobs(
          n_samples=500, centers=2, n_features=128, random_state=0
      )
  
      cu_knn = cuKNN(algorithm=algo, metric=metric)
      cu_knn.fit(X)
      cu_dist, cu_ind = cu_knn.kneighbors(
          X, n_neighbors=10, return_distance=True
      )
      del cu_knn
      gc.collect()
  
      X = X.get()
      sk_knn = skKNN(metric=metric)
      sk_knn.fit(X)
      sk_dist, sk_ind = sk_knn.kneighbors(
          X, n_neighbors=10, return_distance=True
      )
  
      return array_equal(sk_dist, cu_dist)
  
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 9 for calling a global function with example usage: test_ann_distances_metrics(algo, metric) and returns: array_equal