code: def deep_copy_node(node: TreeNode):
      if type(node) == LeafNode:
          node: LeafNode = node
          return LeafNode(
              node.split.out_of_sample_conditioner(),
              value=node.current_value,
              depth=node.depth,
          )
      elif type(node) == DecisionNode:
          node: DecisionNode = node
          return DecisionNode(
              node.split.out_of_sample_conditioner(),
              node.left_child,
              node.right_child,
              depth=node.depth,
          )
      else:
          raise TypeError("Unsupported node type")
  
imports: from typing import Union, Tuple
  from .data import Data
  from .split import Split, SplitCondition
label_desc: Use image node_id 2 for calling a global function with example usage: deep_copy_node(node) and returns: LeafNode, DecisionNode