def chunk(n, chunksize):
    """
    Write a new chuncker here that just spits out how much to read
    so I can go:
    f.seek(0)
    for c in chunk(f.nframes, 1000):
        f.read(c)
    and not go beyond the edge of the file
    >>> list(new_chunk(10, 3))
    [3, 3, 3, 1]
    >>> sum(new_chunk(10, 3))
    10
    """
    i = 0
    while i + chunksize < n:
        yield chunksize
        i += chunksize
    yield n - i
