class_docstr: An encapsulation of the structure of a single decision tree
  Contains no logic, but keeps track of 4 different kinds of nodes within the tree:
    - leaf nodes
    - decision nodes
    - splittable leaf nodes
    - prunable decision nodes
  
  Parameters
  ----------
  nodes: List[Node]
      All nodes contained in the tree, i.e. decision and leaf nodes
class_docstr_tok: ["An","encapsulation","of","the","structure","of","a","single","decision","tree","Contains","no","logic",",","but","keeps","track","of","4","different","kinds","of","nodes","within","the","tree",":","-","leaf","nodes","-","decision","nodes","-","splittable","leaf","nodes","-","prunable","decision","nodes","Parameters","--","--","--","--","--","nodes",":","List","[","Node","]","All","nodes","contained","in","the","tree",",","i.e",".","decision","and","leaf","nodes"]
docstr: List of all nodes contained in the tree
docstr_tok: ["List","of","all","nodes","contained","in","the","tree"]
code: def nodes(self) -> List[TreeNode]:
      """
      List of all nodes contained in the tree
      """
      return self._nodes
  
file_path: imodels/imodels/experimental/bartpy/tree.py
imports: from typing import List
  import numpy
  from .mutation import TreeMutation
  from .node import TreeNode, LeafNode, DecisionNode, deep_copy_node
label_desc: Use image node_id 2 for calling the Tree obj's underlying member method code with example usage: obj.nodes() and returns: self