code: def test_umap_transform_reproducibility(n_components, random_state):
      n_samples = 5000
      n_features = 200
  
      if random_state is None:
          n_components *= 2
  
      data, labels = make_blobs(
          n_samples=n_samples,
          n_features=n_features,
          centers=10,
          random_state=42,
      )
  
      selection = np.random.RandomState(42).choice(
          [True, False], n_samples, replace=True, p=[0.5, 0.5]
      )
      fit_data = data[selection]
      transform_data = data[~selection]
  
      def get_embedding(n_components, random_state):
          reducer = cuUMAP(
              init="random",
              n_components=n_components,
              random_state=random_state,
          )
          reducer.fit(fit_data, convert_dtype=True)
          return reducer.transform(transform_data, convert_dtype=True)
  
      state = copy.copy(random_state)
      cuml_embedding1 = get_embedding(n_components, state)
      state = copy.copy(random_state)
      cuml_embedding2 = get_embedding(n_components, state)
  
      assert not np.isnan(cuml_embedding1).any()
      assert not np.isnan(cuml_embedding2).any()
  
      # Reproducibility threshold raised until intermittent failure is fixed
      # Ref: https://github.com/rapidsai/cuml/issues/1903
      mean_diff = np.mean(np.abs(cuml_embedding1 - cuml_embedding2))
      if random_state is not None:
          assert mean_diff == 0.0
      else:
          assert mean_diff > 0.5
  
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 14 for calling a global function with example usage: test_umap_transform_reproducibility(n_components, random_state) and returns: reducer