code: def select_epsilon(condensed_tree, n_clusters):
      """
      Pick optimal epsilon from condensed tree based on n_clusters,
          calls functions specific to 'eom' or 'leaf' selection methods
      """
      cluster_selection_method = condensed_tree.cluster_selection_method
      if cluster_selection_method == "eom":
          return select_epsilon_eom(condensed_tree, n_clusters)
      if cluster_selection_method == "leaf":
          return select_epsilon_leaf(condensed_tree, n_clusters)
      raise ValueError(
          "Invalid Cluster Selection Method: %s\n"
          'Should be one of: "eom", "leaf"\n'
      )
  
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 5 for calling a global function with example usage: select_epsilon(condensed_tree, n_clusters) and returns: select_epsilon_eom, select_epsilon_leaf