def regenerate_node(arbor, node):
    """
    Regenerate the TreeNode using the provided arbor.

    This is to be used when the original arbor associated with the
    TreeNode no longer exists.
    """

    if node.is_root:
        return arbor[node._arbor_index]
    root_node = node.root
    return root_node.get_node("forest", node.tree_id)