code: def test_flat_base_epsilon():
      """
      Verify that a clustering of HDBSCAN specified by
          cluster_selection_epsilon is preserved.
      """
      # Method 'eom'...
      # Given, a flat clustering for required n_clusters,
      n_clusters = 4
      clusterer_flat = HDBSCAN_flat(
          X, n_clusters=n_clusters, cluster_selection_method="eom"
      )
  
      # When we run the base HDBSCAN using it's epsilon,
      epsilon = clusterer_flat.cluster_selection_epsilon
      clusterer = HDBSCAN(
          cluster_selection_method="eom",
          cluster_selection_epsilon=epsilon,
      ).fit(X)
  
      # Then, the labels and probabilities should match
      assert_array_equal(clusterer_flat.labels_, clusterer.labels_)
      assert_array_equal(
          clusterer_flat.probabilities_, clusterer.probabilities_
      )
  
      # Method 'leaf'...
      # Given, a flat clustering for required n_clusters,
      n_clusters = 6
      clusterer_flat = HDBSCAN_flat(
          X, n_clusters=n_clusters, cluster_selection_method="leaf"
      )
  
      # When we run the base HDBSCAN using it's epsilon,
      epsilon = clusterer_flat.cluster_selection_epsilon
      clusterer = HDBSCAN(
          cluster_selection_method="leaf",
          cluster_selection_epsilon=epsilon,
      ).fit(X)
  
      # 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 3 for calling a global function with example usage: test_flat_base_epsilon() without return types