code: def _umap_mnmg_trustworthiness(
      local_X, local_y, n_neighbors, supervised, n_parts, sampling_ratio
  ):
      """
      Train model on random sample of data, transform in
      parallel, report trustworthiness
      """
      import dask.array as da
      from cuml.dask.manifold import UMAP as MNMG_UMAP
  
      from cuml.manifold import UMAP
  
      local_model = UMAP(
          n_neighbors=n_neighbors, random_state=42, init="random"
      )
  
      n_samples = local_X.shape[0]
      n_samples_per_part = math.ceil(n_samples / n_parts)
  
      selection = np.random.RandomState(42).choice(
          [True, False],
          n_samples,
          replace=True,
          p=[sampling_ratio, 1.0 - sampling_ratio],
      )
      X_train = local_X[selection]
      X_transform = local_X
      X_transform_d = da.from_array(
          X_transform, chunks=(n_samples_per_part, -1)
      )
  
      y_train = None
      if supervised:
          y_train = local_y[selection]
  
      local_model.fit(X_train, y=y_train)
  
      distributed_model = MNMG_UMAP(model=local_model)
      embedding = distributed_model.transform(X_transform_d)
  
      embedding = embedding.compute()
      return trustworthiness(
          X_transform,
          embedding,
          n_neighbors=n_neighbors,
          batch_size=5000,
      )
  
file_path: cuml/python/cuml/tests/dask/test_dask_umap.py
imports: from sklearn.datasets import load_iris
  from sklearn.datasets import load_digits
  import math
  from cuml.metrics import trustworthiness
  from cuml.internals import logger
  from cuml.internals.safe_imports import cpu_only_import
  import pytest
  from cuml.internals.safe_imports import gpu_only_import
label_desc: Use image node_id 3 for calling a global function with example usage: _umap_mnmg_trustworthiness(local_X, local_y, n_neighbors, supervised, n_parts, sampling_ratio) and returns: trustworthiness