def METHOD_NAME(self, chunksize):
    if chunksize < 0:
        raise ValueError("Invalid chunk-size %d!" % chunksize)
    data_file = self.data_file
    for chunk in iter(lambda: data_file.read(chunksize), ''):
        yield chunk