code: def test_nn_downcast_fails(input_type, nrows, n_feats):
      from sklearn.datasets import make_blobs as skmb
  
      X, y = skmb(n_samples=nrows, n_features=n_feats, random_state=0)
  
      knn_cu = cuKNN()
      if input_type == "dataframe":
          X_pd = pd.DataFrame(
              {"fea%d" % i: X[0:, i] for i in range(X.shape[1])}
          )
          X_cudf = cudf.DataFrame.from_pandas(X_pd)
          knn_cu.fit(X_cudf, convert_dtype=True)
  
      with pytest.raises(Exception):
          knn_cu.fit(X, convert_dtype=False)
  
      # Test fit() fails when downcast corrupted data
      X = np.array([[np.finfo(np.float32).max]], dtype=np.float64)
      knn_cu = cuKNN()
      with pytest.raises(Exception):
          knn_cu.fit(X, convert_dtype=False)
  
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 14 for calling a global function with example usage: test_nn_downcast_fails(input_type, nrows, n_feats) without return types