code: def test_haversine(n_neighbors):
      hoboken_nj = [40.745255, -74.034775]
      port_hueneme_ca = [34.155834, -119.202789]
      auburn_ny = [42.933334, -76.566666]
      league_city_tx = [29.499722, -95.089722]
      tallahassee_fl = [30.455000, -84.253334]
      aurora_il = [41.763889, -88.29001]
  
      data = np.array(
          [
              hoboken_nj,
              port_hueneme_ca,
              auburn_ny,
              league_city_tx,
              tallahassee_fl,
              aurora_il,
          ]
      )
  
      data = data * math.pi / 180
  
      pw_dists = pairwise_distances(data, metric="haversine")
  
      cunn = cuKNN(
          metric="haversine", n_neighbors=n_neighbors, algorithm="brute"
      )
  
      dists, inds = cunn.fit(data).kneighbors(data)
  
      argsort = np.argsort(pw_dists, axis=1)
  
      for i in range(pw_dists.shape[0]):
          cpu_ordered = pw_dists[i, argsort[i]]
          cp.testing.assert_allclose(
              cpu_ordered[:n_neighbors], dists[i], atol=1e-4, rtol=1e-4
          )
  
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 18 for calling a global function with example usage: test_haversine(n_neighbors) without return types