code: def test_flat_base_default():
      """
      Verify that the default clustering of HDBSCAN is preserved.
      """
      # Given, the base HDBSCAN with method 'eom'
      clusterer = HDBSCAN(cluster_selection_method="eom").fit(X)
      n_clusters = n_clusters_from_labels(clusterer.labels_)
  
      # When we ask for flat clustering with same n_clusters,
      clusterer_flat = HDBSCAN_flat(
          X, n_clusters=n_clusters, cluster_selection_method="eom"
      )
  
      # Then, the labels and probabilities should match
      assert_array_equal(clusterer_flat.labels_, clusterer.labels_)
      assert_array_equal(
          clusterer_flat.probabilities_, clusterer.probabilities_
      )
  
      # Given, the base HDBSCAN with method 'leaf'
      clusterer = HDBSCAN(cluster_selection_method="leaf").fit(X)
      n_clusters = n_clusters_from_labels(clusterer.labels_)
  
      # When we ask for flat clustering with same n_clusters,
      clusterer_flat = HDBSCAN_flat(
          X, n_clusters=n_clusters, cluster_selection_method="leaf"
      )
  
      # Then, the labels and probabilities should match
      assert_array_equal(clusterer_flat.labels_, clusterer.labels_)
      assert_array_equal(
          clusterer_flat.probabilities_, clusterer.probabilities_
      )
      return
  
file_path: hdbscan/hdbscan/tests/test_flat.py
imports: import warnings
  import numpy
  from hdbscan import HDBSCAN, approximate_predict
  from hdbscan.flat import HDBSCAN_flat, approximate_predict_flat, membership_vector_flat, all_points_membership_vectors_flat
  from sklearn.datasets import make_blobs, make_moons
  from sklearn.preprocessing import StandardScaler
  from sklearn.model_selection import train_test_split
  from sklearn.utils._testing import assert_array_equal, assert_array_less
label_desc: Use image node_id 2 for calling a global function with example usage: test_flat_base_default() without return types