code: def _local_umap_trustworthiness(
      local_X, local_y, n_neighbors, supervised
  ):
      """
      Train model on all data, report trustworthiness
      """
      from cuml.manifold import UMAP
  
      local_model = UMAP(
          n_neighbors=n_neighbors, random_state=42, init="random"
      )
      y_train = None
      if supervised:
          y_train = local_y
      local_model.fit(local_X, y=y_train)
      embedding = local_model.transform(local_X)
      return trustworthiness(
          local_X, 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 2 for calling a global function with example usage: _local_umap_trustworthiness(local_X, local_y, n_neighbors, supervised) and returns: trustworthiness