def __call__(self, chunk_path):
<EOL>tmp_chunk_path = chunk_path + '<STR_LIT:_>'<EOL>t_chunk = Chunk(path=tmp_chunk_path, mode='<STR_LIT:wb>')<EOL>for num, si in enumerate(Chunk(path=chunk_path)):<EOL><INDENT>if num < self.config['<STR_LIT>']:<EOL><INDENT>t_chunk.add(si)<EOL><DEDENT>else:<EOL><INDENT>break<EOL><DEDENT><DEDENT>t_chunk.close()<EOL>os.rename(tmp_chunk_path, chunk_path)<EOL>
batch-type transform stage: reads a chunk from chunk_path, and
replaces it with a new chunk at the same path