class_docstr: A tree implementation.
class_docstr_tok: ["A","tree","implementation","."]
docstr: Get the leaves of the tree starting at the root.
  
  Args:
      limit_nodes_to: Limit leaves to Nodes with the names (DataIDs)
          specified.
      unique: Only include individual leaf nodes once.
  
  Returns:
      list of leaf nodes
docstr_tok: ["Get","the","leaves","of","the","tree","starting","at","the","root",".","Args",":","limit_nodes_to",":","Limit","leaves","to","Nodes","with","the","names","(","DataIDs",")","specified",".","unique",":","Only","include","individual","leaf","nodes","once",".","Returns",":","list","of","leaf","nodes"]
code: def leaves(
      self,
      limit_nodes_to: Optional[Iterable[DataID]] = None,
      unique: bool = True,
  ) -> list[Node]:
      """Get the leaves of the tree starting at the root.
  
      Args:
          limit_nodes_to: Limit leaves to Nodes with the names (DataIDs)
              specified.
          unique: Only include individual leaf nodes once.
  
      Returns:
          list of leaf nodes
  
      """
      if limit_nodes_to is None:
          return self._root.leaves(unique=unique)
  
      res = list()
      for child_id in limit_nodes_to:
          for sub_child in self._all_nodes[child_id].leaves(
              unique=unique
          ):
              if not unique or sub_child not in res:
                  res.append(sub_child)
      return res
  
imports: from __future__ import annotations
  from typing import Container, Iterable, Optional
  import numpy
  from satpy import DataID, DatasetDict
  from satpy.dataset import ModifierTuple, create_filtered_query
  from satpy.dataset.data_dict import TooManyResults, get_key
  from satpy.node import EMPTY_LEAF_NAME, LOG, CompositorNode, MissingDependencies, Node, ReaderNode
label_desc: Use image node_id 2 for calling the Tree obj's underlying member method code with example usage: obj.leaves(limit_nodes_to, unique) and returns: res, self