<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def digest_chunks(chunks, algorithms=(hashlib.md5, hashlib.sha1)):
 """ returns a base64 rep of the given digest algorithms from the chunks of data """


    hashes = [algorithm() for algorithm in algorithms]

    for chunk in chunks:
        for h in hashes:
            h.update(chunk)

    return [_b64encode_to_str(h.digest()) for h in hashes]