Checks that `leaf_element` was contained in the tree represented by
    `merkleroot`.

def validate_proof(proof: List[Keccak256], root: Keccak256, leaf_element: Keccak256) -> bool:
    """ Checks that `leaf_element` was contained in the tree represented by
    `merkleroot`.
    """

    hash_ = leaf_element
    for pair in proof:
        hash_ = hash_pair(hash_, pair)

    return hash_ == root