code: def test_rsl_distance_matrix():
      D = distance.squareform(distance.pdist(X))
      D /= np.max(D)
  
      labels, tree = robust_single_linkage(D, 0.4, metric="precomputed")
      # number of clusters, ignoring noise if present
      n_clusters_1 = len(set(labels)) - int(
          -1 in labels
      )  # ignore noise
      assert n_clusters_1 == 2
  
      labels = RobustSingleLinkage(metric="precomputed").fit(D).labels_
      n_clusters_2 = len(set(labels)) - int(-1 in labels)
      assert n_clusters_2 == 2
  
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 1 for calling a global function with example usage: test_rsl_distance_matrix() without return types