human
Complete this python program:
def getchunks(im, **params):
assistant
#Here is the Python program you requested.

    """Return a list of PNG chunks representing this image.
    """
    class collector(object, ):
        data = []
        def write(self, data):
            pass
        def append(self, chunk):
            self.data.append(chunk)
    def append(fp, cid, *data):
        data = ''.join(data)
        (hi, lo) = Image.core.crc32(data, Image.core.crc32(cid))
        crc = (o16(hi) + o16(lo))
        fp.append((cid, data, crc))
    fp = collector()
    try:
        im.encoderinfo = params
        _save(im, fp, None, append)
    finally:
        del im.encoderinfo
    return fp.data