def min_node(tree):
    """
    Return the minimum node of the tree or raise a ValueError
    if the tree is empty.
    """
    if tree is None:
        raise ValueError("Can't take min of empty tree")
    if tree.left:
        return min_node(tree.left)
    return tree