code: def test_rsl_prims_kdtree():
      labels, tree = robust_single_linkage(
          X, 0.4, algorithm="prims_kdtree"
      )
      n_clusters_1 = len(set(labels)) - int(-1 in labels)
      assert n_clusters_1 == n_clusters
  
      labels = (
          RobustSingleLinkage(algorithm="prims_kdtree").fit(X).labels_
      )
      n_clusters_2 = len(set(labels)) - int(-1 in labels)
      assert n_clusters_2 == n_clusters
  
imports: import numpy
  from scipy.spatial import distance
  from scipy import sparse
  from sklearn.utils.estimator_checks import check_estimator
  from sklearn.utils._testing import assert_array_equal, assert_raises
  from hdbscan import RobustSingleLinkage, robust_single_linkage
  from sklearn import datasets
  import warnings
  from sklearn.datasets import make_blobs
  from sklearn.utils import shuffle
  from sklearn.preprocessing import StandardScaler
  import pytest
label_desc: Use image node_id 7 for calling a global function with example usage: test_rsl_prims_kdtree() without return types