code: def test_multi_component_layout_precomputed():
      data, labels = make_blobs(
          100,
          2,
          centers=5,
          cluster_std=0.5,
          center_box=(-20, 20),
          random_state=42,
      )
      dmat = pairwise_distances(data)
  
      true_centroids = np.empty(
          (labels.max() + 1, data.shape[1]), dtype=np.float64
      )
  
      for label in range(labels.max() + 1):
          true_centroids[label] = data[labels == label].mean(axis=0)
  
      true_centroids = normalize(true_centroids, norm="l2")
  
      embedding = UMAP(
          n_neighbors=4, metric="precomputed", n_epochs=100
      ).fit_transform(dmat)
      embed_centroids = np.empty(
          (labels.max() + 1, data.shape[1]), dtype=np.float64
      )
      embed_labels = KMeans(n_clusters=5).fit_predict(embedding)
  
      for label in range(embed_labels.max() + 1):
          embed_centroids[label] = data[embed_labels == label].mean(
              axis=0
          )
  
      embed_centroids = normalize(embed_centroids, norm="l2")
  
      error = np.sum((true_centroids - embed_centroids) ** 2)
  
      assert error < 15.0, "Multi component embedding to far astray"
  
imports: from sklearn.datasets import make_blobs
  from sklearn.cluster import KMeans
  from sklearn.metrics import adjusted_rand_score, pairwise_distances
  from sklearn.preprocessing import normalize
  from numpy.testing import assert_array_equal
  from umap import UMAP
  from umap.spectral import component_layout
  import numpy
  import scipy.sparse
  import pytest
  import warnings
  from umap.distances import pairwise_special_metric
  from umap.utils import disconnected_vertices
  from scipy.sparse import csr_matrix
label_desc: Use image node_id 3 for calling a global function with example usage: test_multi_component_layout_precomputed() without return types