def METHOD_NAME(node: TreeNode):
    if len(node.children) > 1:
        raise ValueError('Expect node to be a TreeNode with single child')
    return METHOD_NAME(node.children[0]) if len(node.children) else node.item