code: def predict(neigh_ind, _y, n_neighbors):
      if has_scipy():
          import scipy.stats as stats
      else:
          raise RuntimeError("Scipy is needed to run predict()")
  
      neigh_ind = neigh_ind.astype(np.int64)
  
      ypred, count = stats.mode(_y[neigh_ind], axis=1)
      return ypred.ravel(), count.ravel() * 1.0 / n_neighbors
  
file_path: cuml/python/cuml/tests/dask/test_dask_nearest_neighbors.py
imports: import platform
  from cuml.testing.utils import array_equal
  from sklearn.neighbors import KNeighborsClassifier
  from cuml.testing.utils import unit_param, quality_param, stress_param
  from cuml.dask.common import utils
  from cuml.common import has_scipy
  from cuml.internals.safe_imports import cpu_only_import
  import pytest
  from cuml.internals.safe_imports import gpu_only_import
label_desc: Use image node_id 1 for calling a global function with example usage: predict(neigh_ind, _y, n_neighbors) and returns: ypred,  unknown