code: def deep_copy_tree(tree: Tree):
      """
      Efficiently create a copy of the tree for storage
      Creates a memory-light version of the tree with access to important information
      Parameters
      ----------
      tree: Tree
          Tree to copy
  
      Returns
      -------
      Tree
          Version of the tree optimized to be low memory
      """
      return Tree([deep_copy_node(x) for x in tree.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 a global function with example usage: deep_copy_tree(tree) and returns: Tree