def inorder_traversal(root):
    """Function to traverse a binary tree inorder

    Args:
        root (Node): The root of a binary tree

    Returns:
        (list): List containing all the values of the tree from an inorder search
    """
    res = []
    if root:
        res = inorder_traversal(root.left)
        res.append(root.data)
        res = res + inorder_traversal(root.right)
    return res