code: def epsilon_search(
      leaves,
      cluster_tree,
      cluster_selection_epsilon,
      allow_single_cluster,
  ):
      selected_clusters = []
      processed = []
  
      for leaf in leaves:
          eps = (
              1
              / cluster_tree["lambda_val"][
                  cluster_tree["child"] == leaf
              ][0]
          )
          if eps < cluster_selection_epsilon:
              if leaf not in processed:
                  epsilon_child = traverse_upwards(
                      cluster_tree,
                      cluster_selection_epsilon,
                      leaf,
                      allow_single_cluster,
                  )
                  if hasattr(epsilon_child, "__len__"):
                      epsilon_child = epsilon_child[0]
  
                  selected_clusters.append(epsilon_child)
  
                  for sub_node in _bfs_from_cluster_tree(
                      cluster_tree, epsilon_child
                  ):
                      if sub_node != epsilon_child:
                          processed.append(sub_node)
          else:
              selected_clusters.append(leaf)
  
      return set(selected_clusters)
  
imports: import copy
  from warnings import warn
  import numpy
  from ._hdbscan_tree import compute_stability, get_cluster_tree_leaves
  from .hdbscan_ import HDBSCAN, _tree_to_labels
  from .plots import _bfs_from_cluster_tree
  from .prediction import PredictionData, _find_cluster_and_probability, _find_neighbor_and_lambda
  from ._prediction_utils import get_tree_row_with_child, dist_membership_vector, outlier_membership_vector, prob_in_some_cluster, all_points_dist_membership_vector, all_points_outlier_membership_vector, all_points_prob_in_some_cluster
label_desc: Use image node_id 10 for calling a global function with example usage: epsilon_search(leaves, cluster_tree, cluster_selection_epsilon, allow_single_cluster) and returns: set