code: def test_umap_precomputed_knn(precomputed_type, sparse_input):
      data, labels = make_blobs(
          n_samples=2000, n_features=10, centers=5, random_state=0
      )
      data = data.astype(np.float32)
  
      if sparse_input:
          sparsification = np.random.choice(
              [0.0, 1.0], p=[0.1, 0.9], size=data.shape
          )
          data = np.multiply(data, sparsification)
          data = scipy_sparse.csr_matrix(data)
  
      n_neighbors = 8
  
      if precomputed_type == "knn_graph":
          nn = NearestNeighbors(n_neighbors=n_neighbors)
          nn.fit(data)
          precomputed_knn = nn.kneighbors_graph(data, mode="distance")
      elif precomputed_type == "tuple":
          nn = NearestNeighbors(n_neighbors=n_neighbors)
          nn.fit(data)
          precomputed_knn = nn.kneighbors(data, return_distance=True)
          precomputed_knn = (precomputed_knn[1], precomputed_knn[0])
      elif precomputed_type == "pairwise":
          precomputed_knn = pairwise_distances(data)
  
      model = cuUMAP(
          n_neighbors=n_neighbors, precomputed_knn=precomputed_knn
      )
      embedding = model.fit_transform(data)
      trust = trustworthiness(data, embedding, n_neighbors=n_neighbors)
      assert trust >= 0.92
  
imports: import platform
  import pytest
  import copy
  import joblib
  from sklearn.metrics import adjusted_rand_score
  from sklearn.manifold import trustworthiness
  from sklearn.datasets import make_blobs
  from sklearn.cluster import KMeans
  from sklearn.neighbors import NearestNeighbors
  from sklearn import datasets
  from cuml.internals import logger
  from cuml.metrics import pairwise_distances
  from cuml.testing.utils import array_equal, unit_param, quality_param, stress_param
  from cuml.manifold.umap import UMAP
  from cuml.internals.safe_imports import cpu_only_import
  from cuml.internals.safe_imports import gpu_only_import
label_desc: Use image node_id 19 for calling a global function with example usage: test_umap_precomputed_knn(precomputed_type, sparse_input) without return types