code: def test_proxima_nearest_neighbors_execution(setup):
      rs = np.random.RandomState(0)
      raw_X = rs.rand(10, 5).astype("float32")
      raw_Y = rs.rand(8, 5).astype("float32")
  
      # test faiss execution
      X = mt.tensor(raw_X, chunk_size=6)
      Y = mt.tensor(raw_Y, chunk_size=(5, 3))
  
      nn = NearestNeighbors(
          n_neighbors=3, algorithm="proxima", metric="l2"
      )
      nn.fit(X)
  
      ret = nn.kneighbors(Y)
  
      snn = SkNearestNeighbors(
          n_neighbors=3, algorithm="auto", metric="l2"
      )
      snn.fit(raw_X)
      expected = snn.kneighbors(raw_Y)
  
      result = [r.fetch() for r in ret]
      np.testing.assert_almost_equal(result[0], expected[0], decimal=6)
      np.testing.assert_almost_equal(result[1], expected[1])
  
      # test return_distance=False
      ret = nn.kneighbors(Y, return_distance=False)
  
      result = ret.fetch()
      np.testing.assert_almost_equal(result, expected[1])
  
      # test y is x
      ret = nn.kneighbors()
  
      expected = snn.kneighbors()
  
      result = [r.fetch() for r in ret]
      np.testing.assert_almost_equal(result[0], expected[0], decimal=5)
      np.testing.assert_almost_equal(result[1], expected[1])
  
file_path: mars/mars/learn/neighbors/tests/test_nearest_neighbors.py
imports: import numpy
  import scipy.sparse
  import pytest
  from ....None import tensor
  from ....core import tile
  from ....lib.sparse import SparseNDArray
  from ....tests.core import require_cupy
  from ....utils import lazy_import
  from ...proxima.core import proxima
  from ..None import NearestNeighbors
label_desc: Use image node_id 5 for calling a global function with example usage: test_proxima_nearest_neighbors_execution(setup) without return types