code: def test_kneighbors_regressor(
      n_samples=40,
      n_features=5,
      n_test_pts=10,
      n_neighbors=3,
      random_state=0,
  ):
      # Test k-neighbors regression
      rng = np.random.RandomState(random_state)
      X = 2 * rng.rand(n_samples, n_features) - 1
      y = np.sqrt((X**2).sum(1))
      y /= y.max()
  
      y_target = y[:n_test_pts]
  
      knn = cuKNN(n_neighbors=n_neighbors)
      knn.fit(X, y)
      epsilon = 1e-5 * (2 * rng.rand(1, n_features) - 1)
      y_pred = knn.predict(X[:n_test_pts] + epsilon)
      assert np.all(abs(y_pred - y_target) < 0.3)
  
file_path: cuml/python/cuml/tests/test_kneighbors_regressor.py
imports: from cuml.testing.utils import array_equal
  from cuml.internals.safe_imports import cpu_only_import
  from cuml.internals.safe_imports import cpu_only_import_from
  from sklearn.model_selection import train_test_split
  from sklearn.utils.validation import check_random_state
  from sklearn.datasets import make_blobs
  from cuml.neighbors import KNeighborsRegressor
  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: test_kneighbors_regressor(n_samples, n_features, n_test_pts, n_neighbors, random_state) without return types