code: def test_tsne(test_datasets, method):
      """
      This tests how TSNE handles a lot of input data across time.
      (1) Numpy arrays are passed in
      (2) Params are changed in the TSNE class
      (3) The class gets re-used across time
      (4) Trustworthiness is checked
      (5) Tests NAN in TSNE output for learning rate explosions
      (6) Tests verbosity
      """
      X = test_datasets.data
  
      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,
      )
  
      Y = tsne.fit_transform(X)
      validate_embedding(X, Y)
  
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 5 for calling a global function with example usage: test_tsne(test_datasets, method) without return types