<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 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