class_docstr: Extra data that allows for faster prediction if cached.
  
  Parameters
  ----------
  
  data : array (n_samples, n_features)
      The original data set that was clustered
  
  condensed_tree : CondensedTree
      The condensed tree object created by a clustering
  
  min_samples : int
      The min_samples value used in clustering
  
  tree_type : string, optional
      Which type of space tree to use for core distance computation.
      One of:
          * ``kdtree``
          * ``balltree``
  
  metric : string, optional
      The metric used to determine distance for the clustering.
      This is the metric that will be used for the space tree to determine
      core distances etc.
  
  **kwargs :
      Any further arguments to the metric.
  
  Attributes
  ----------
  
  raw_data : array (n_samples, n_features)
      The original data set that was clustered
  
  tree : KDTree or BallTree
      A space partitioning tree that can be queried for nearest neighbors.
  
  core_distances : array (n_samples,)
      The core distances for every point in the original data set.
  
  cluster_map : dict
      A dictionary mapping cluster numbers in the condensed tree to labels
      in the final selected clustering.
  
  cluster_tree : structured array
      A version of the condensed tree that only contains clusters, not
      individual points.
  
  max_lambdas : dict
      A dictionary mapping cluster numbers in the condensed tree to the
      maximum lambda value seen in that cluster.
class_docstr_tok: ["Extra","data","that","allows","for","faster","prediction","if","cached",".","Parameters","--","--","--","--","--","data",":","array","(","n_samples",",","n_features",")","The","original","data","set","that","was","clustered","condensed_tree",":","CondensedTree","The","condensed","tree","object","created","by","a","clustering","min_samples",":","int","The","min_samples","value","used","in","clustering","tree_type",":","string",",","optional","Which","type","of","space","tree","to","use","for","core","distance","computation",".","One","of",":","*","``","kdtree","``","*","``","balltree","``","metric",":","string",",","optional","The","metric","used","to","determine","distance","for","the","clustering",".","This","is","the","metric","that","will","be","used","for","the","space","tree","to","determine","core","distances","etc",".","*","*","kwargs",":","Any","further","arguments","to","the","metric",".","Attributes","--","--","--","--","--","raw_data",":","array","(","n_samples",",","n_features",")","The","original","data","set","that","was","clustered","tree",":","KDTree","or","BallTree","A","space","partitioning","tree","that","can","be","queried","for","nearest","neighbors",".","core_distances",":","array","(","n_samples",",",")","The","core","distances","for","every","point","in","the","original","data","set",".","cluster_map",":","dict","A","dictionary","mapping","cluster","numbers","in","the","condensed","tree","to","labels","in","the","final","selected","clustering",".","cluster_tree",":","structured","array","A","version","of","the","condensed","tree","that","only","contains","clusters",",","not","individual","points",".","max_lambdas",":","dict","A","dictionary","mapping","cluster","numbers","in","the","condensed","tree","to","the","maximum","lambda","value","seen","in","that","cluster","."]
code: def _recurse_leaf_dfs(self, current_node):
      children = self.cluster_tree[
          self.cluster_tree["parent"] == current_node
      ]["child"]
      if len(children) == 0:
          return [
              current_node,
          ]
      else:
          return sum(
              [
                  recurse_leaf_dfs(self.cluster_tree, child)
                  for child in children
              ],
              [],
          )
  
file_path: hdbscan/hdbscan/prediction.py
imports: import numpy
  from sklearn.neighbors import KDTree, BallTree
  from .dist_metrics import DistanceMetric
  from ._hdbscan_tree import recurse_leaf_dfs
  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
  from warnings import warn
label_desc: Use image node_id 2 for calling the PredictionData obj's underlying member method code with example usage: obj._recurse_leaf_dfs(current_node) and returns: list, sum