def copyfileobj(src, dst, length=None):
if length == <NUM_LIT:0>:<EOL><INDENT>return<EOL><DEDENT>if length is None:<EOL><INDENT>while True:<EOL><INDENT>buf = src.read(<NUM_LIT:16>*<NUM_LIT>)<EOL>if not buf:<EOL><INDENT>break<EOL><DEDENT>dst.write(buf)<EOL><DEDENT>return<EOL><DEDENT>BUFSIZE = <NUM_LIT:16> * <NUM_LIT><EOL>blocks, remainder = divmod(length, BUFSIZE)<EOL>for b in range(blocks):<EOL><INDENT>buf = src.read(BUFSIZE)<EOL>if len(buf) < BUFSIZE:<EOL><INDENT>raise IOError("<STR_LIT>")<EOL><DEDENT>dst.write(buf)<EOL><DEDENT>if remainder != <NUM_LIT:0>:<EOL><INDENT>buf = src.read(remainder)<EOL>if len(buf) < remainder:<EOL><INDENT>raise IOError("<STR_LIT>")<EOL><DEDENT>dst.write(buf)<EOL><DEDENT>return<EOL>
Copy length bytes from fileobj src to fileobj dst.
       If length is None, copy the entire content.