code: def test_tsne_knn_parameters(test_datasets, type_knn_graph, method):
      X = test_datasets.data
  
      from sklearn.preprocessing import normalize
  
      X = normalize(X, norm="l1")
  
      neigh = cuKNN(
          n_neighbors=DEFAULT_N_NEIGHBORS, metric="euclidean"
      ).fit(X)
      knn_graph = neigh.kneighbors_graph(X, mode="distance").astype(
          "float32"
      )
  
      if type_knn_graph == "cuml":
          knn_graph = cupyx.scipy.sparse.csr_matrix(knn_graph)
  
      tsne = TSNE(
          n_components=2,
          random_state=1,
          n_neighbors=DEFAULT_N_NEIGHBORS,
          learning_rate_method="none",
          method=method,
          min_grad_norm=1e-12,
          perplexity=DEFAULT_PERPLEXITY,
      )
  
      embed = tsne.fit_transform(X, True, knn_graph)
      validate_embedding(X, embed)
  
      embed = tsne.fit_transform(X, True, knn_graph.tocoo())
      validate_embedding(X, embed)
  
      embed = tsne.fit_transform(X, True, knn_graph.tocsc())
      validate_embedding(X, embed)
  
imports: import pytest
  from sklearn.manifold import TSNE
  from sklearn import datasets
  from sklearn.manifold import trustworthiness
  from sklearn.datasets import make_blobs
  from sklearn.neighbors import NearestNeighbors
  from cuml.manifold import TSNE
  from cuml.neighbors import NearestNeighbors
  from cuml.metrics import pairwise_distances
  from cuml.testing.utils import array_equal, stress_param
  from cuml.internals.safe_imports import cpu_only_import
  from cuml.internals.safe_imports import gpu_only_import
label_desc: Use image node_id 3 for calling a global function with example usage: test_tsne_knn_parameters(test_datasets, type_knn_graph, method) without return types