code: def test_umap_trustworthiness_on_sphere_iris(
      iris,
  ):
      data = iris.data
      embedding = UMAP(
          n_neighbors=10,
          min_dist=0.01,
          n_epochs=200,
          random_state=42,
          output_metric="haversine",
      ).fit_transform(data)
      # Since trustworthiness doesn't support haversine, project onto
      # a 3D embedding of the sphere and use cosine distance
      r = 3
      projected_embedding = np.vstack(
          [
              r * np.sin(embedding[:, 0]) * np.cos(embedding[:, 1]),
              r * np.sin(embedding[:, 0]) * np.sin(embedding[:, 1]),
              r * np.cos(embedding[:, 0]),
          ]
      ).T
      trust = trustworthiness(
          iris.data,
          projected_embedding,
          n_neighbors=10,
          metric="cosine",
      )
      assert (
          trust >= 0.65
      ), "Insufficiently trustworthy spherical embedding for iris dataset: {}".format(
          trust
      )
  
imports: from umap import UMAP
  from umap.umap_ import nearest_neighbors
  from scipy import sparse
  import numpy
  from sklearn.cluster import KMeans
  from sklearn.metrics import adjusted_rand_score
  from sklearn.neighbors import KDTree
  from scipy.spatial.distance import cdist, pdist, squareform
  import pytest
  import warnings
label_desc: Use image node_id 3 for calling a global function with example usage: test_umap_trustworthiness_on_sphere_iris(iris) without return types