<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def piece_file(input_f, chunk_size):
 """ Provides a streaming interface to file data in chunks of even size, which avoids memoryerrors from loading whole files into RAM to pass to `pieces`. """

        chunk = input_f.read(chunk_size)
        total_bytes = 0
        while chunk:
            yield chunk
            chunk = input_f.read(chunk_size)
            total_bytes += len(chunk)