code: def test_component_layout_options(nn_data):
      dmat = pairwise_distances(nn_data[:1000])
      n_components = 5
      component_labels = np.repeat(np.arange(5), dmat.shape[0] // 5)
      single = component_layout(
          dmat,
          n_components,
          component_labels,
          2,
          None,
          metric="precomputed",
          metric_kwds={"linkage": "single"},
      )
      average = component_layout(
          dmat,
          n_components,
          component_labels,
          2,
          None,
          metric="precomputed",
          metric_kwds={"linkage": "average"},
      )
      complete = component_layout(
          dmat,
          n_components,
          component_labels,
          2,
          None,
          metric="precomputed",
          metric_kwds={"linkage": "complete"},
      )
  
      assert single.shape[0] == 5
      assert average.shape[0] == 5
      assert complete.shape[0] == 5
  
      assert not np.all(single == average)
      assert not np.all(single == complete)
      assert not np.all(average == complete)
  
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 11 for calling a global function with example usage: test_component_layout_options(nn_data) without return types