<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def merkle(hashes, hash_f=double_sha256):
 """Take a list of hashes, and return the root merkle hash."""

    while len(hashes) > 1:
        hashes = merkle_pair(hashes, hash_f)
    return hashes[0]