code: def test_return_dists():
      n_samples = 50
      n_feats = 50
      k = 5
  
      X, y = make_blobs(
          n_samples=n_samples, n_features=n_feats, random_state=0
      )
  
      knn_cu = cuKNN()
      knn_cu.fit(X)
  
      ret = knn_cu.kneighbors(X, k, return_distance=False)
      assert not isinstance(ret, tuple)
      assert ret.shape == (n_samples, k)
  
      ret = knn_cu.kneighbors(X, k, return_distance=True)
      assert isinstance(ret, tuple)
      assert len(ret) == 2
  
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 10 for calling a global function with example usage: test_return_dists() without return types