code: def test_cluster_qr():
      # cluster_qr by itself should not be used for clustering generic data
      # other than the rows of the eigenvectors within spectral clustering,
      # but cluster_qr must still preserve the labels for different dtypes
      # of the generic fixed input even if the labels may be meaningless.
      random_state = np.random.RandomState(seed=8)
      n_samples, n_components = 10, 5
      data = random_state.randn(n_samples, n_components)
      labels_float64 = cluster_qr(data.astype(np.float64))
      # Each sample is assigned a cluster identifier
      assert labels_float64.shape == (n_samples,)
      # All components should be covered by the assignment
      assert np.array_equal(
          np.unique(labels_float64), np.arange(n_components)
      )
      # Single precision data should yield the same cluster assignments
      labels_float32 = cluster_qr(data.astype(np.float32))
      assert np.array_equal(labels_float64, labels_float32)
  
imports: import pickle
  import re
  import numpy
  import pytest
  from scipy.linalg import LinAlgError
  from sklearn.cluster import SpectralClustering, spectral_clustering
  from sklearn.cluster._spectral import cluster_qr, discretize
  from sklearn.datasets import make_blobs
  from sklearn.feature_extraction import img_to_graph
  from sklearn.metrics import adjusted_rand_score
  from sklearn.metrics.pairwise import kernel_metrics, rbf_kernel
  from sklearn.neighbors import NearestNeighbors
  from sklearn.utils import check_random_state
  from sklearn.utils._testing import assert_array_equal
  from sklearn.utils.fixes import COO_CONTAINERS, CSR_CONTAINERS
label_desc: Use image node_id 5 for calling a global function with example usage: test_cluster_qr() without return types