code: def test_single_linkage_sklearn_compare(
      nrows, ncols, nclusters, k, connectivity
  ):
      X, y = make_blobs(
          int(nrows), ncols, nclusters, cluster_std=1.0, shuffle=False
      )
  
      cuml_agg = AgglomerativeClustering(
          n_clusters=nclusters,
          affinity="euclidean",
          linkage="single",
          n_neighbors=k,
          connectivity=connectivity,
      )
  
      cuml_agg.fit(X)
  
      sk_agg = cluster.AgglomerativeClustering(
          n_clusters=nclusters, affinity="euclidean", linkage="single"
      )
      sk_agg.fit(cp.asnumpy(X))
  
      # Cluster assignments should be exact, even though the actual
      # labels may differ
      assert (
          adjusted_rand_score(cuml_agg.labels_, sk_agg.labels_) == 1.0
      )
      assert (
          cuml_agg.n_connected_components_
          == sk_agg.n_connected_components_
      )
      assert cuml_agg.n_leaves_ == sk_agg.n_leaves_
      assert cuml_agg.n_clusters_ == sk_agg.n_clusters_
  
file_path: cuml/python/cuml/tests/test_agglomerative.py
imports: import pytest
  from cuml.cluster import AgglomerativeClustering
  from cuml.datasets import make_blobs
  from cuml.metrics import adjusted_rand_score
  from sklearn import cluster
  from cuml.internals.safe_imports import gpu_only_import
label_desc: Use image node_id 2 for calling a global function with example usage: test_single_linkage_sklearn_compare(nrows, ncols, nclusters, k, connectivity) without return types