def inner_nodes_recursive(root):
    """
    Return a list of all inner nodes of the tree, from left to right.
    """
    if root.is_leaf():
        return []
    return inner_nodes_recursive(root.left) + [root] + inner_nodes_recursive(root.right)