code: def test_fuzzy_simplicial_set(
      n_rows, n_features, n_neighbors, precomputed_nearest_neighbors
  ):
      n_clusters = 30
      random_state = 42
      metric = "euclidean"
  
      X, _ = make_blobs(
          n_samples=n_rows,
          centers=n_clusters,
          n_features=n_features,
          random_state=random_state,
      )
  
      if precomputed_nearest_neighbors:
          nn = NearestNeighbors(n_neighbors=n_neighbors, metric=metric)
          nn.fit(X)
          knn_dists, knn_indices = nn.kneighbors(
              X, n_neighbors, return_distance=True
          )
          cu_fss_graph = cu_fuzzy_simplicial_set(
              X,
              n_neighbors,
              random_state,
              metric,
              knn_indices=knn_indices,
              knn_dists=knn_dists,
          )
  
          knn_indices = knn_indices.get()
          knn_dists = knn_dists.get()
          ref_fss_graph = ref_fuzzy_simplicial_set(
              X,
              n_neighbors,
              random_state,
              metric,
              knn_indices=knn_indices,
              knn_dists=knn_dists,
          )[0].tocoo()
      else:
          cu_fss_graph = cu_fuzzy_simplicial_set(
              X, n_neighbors, random_state, metric
          )
  
          X = X.get()
          ref_fss_graph = ref_fuzzy_simplicial_set(
              X, n_neighbors, random_state, metric
          )[0].tocoo()
  
      cu_fss_graph = cu_fss_graph.todense()
      ref_fss_graph = cp.sparse.coo_matrix(ref_fss_graph).todense()
      assert correctness_sparse(
          ref_fss_graph,
          cu_fss_graph,
          atol=0.1,
          rtol=0.2,
          threshold=0.95,
      )
  
file_path: cuml/python/cuml/tests/test_simpl_set.py
imports: import platform
  from cuml.manifold.umap import simplicial_set_embedding
  from cuml.manifold.umap import fuzzy_simplicial_set
  from cuml.neighbors import NearestNeighbors
  from cuml.manifold.umap import UMAP
  from cuml.internals.safe_imports import gpu_only_import
  import pytest
  from cuml.datasets import make_blobs
  from cuml.internals.safe_imports import cpu_only_import
label_desc: Use image node_id 3 for calling a global function with example usage: test_fuzzy_simplicial_set(n_rows, n_features, n_neighbors, precomputed_nearest_neighbors) without return types