<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def zlib_decompress_all_frames(data):
 """Decompress all frames of zlib-compressed bytes. Repeatedly tries to decompress `data` until all data are decompressed, or decompression fails. This will skip over bytes that are not compressed with zlib. Parameters data : bytearray or bytes Binary data compressed using zlib. Returns ------- bytearray All decompressed bytes """

    frames = bytearray()
    data = bytes(data)
    while data:
        decomp = zlib.decompressobj()
        try:
            frames.extend(decomp.decompress(data))
            data = decomp.unused_data
        except zlib.error:
            frames.extend(data)
            break
    return frames