code: def copyfileobj(src, dst, length=None, exception=OSError, bufsize=None):
      
      if bufsize is None:
          bufsize = pipebuf.PIPE_BUF_BYTES
  
      if length == 0:
          return
      if length is None:
          shutil.copyfileobj(src, dst, bufsize)
          return
  
      blocks, remainder = divmod(length, bufsize)
      for b in range(blocks):
          buf = src.read(bufsize)
          if len(buf) < bufsize:
              raise exception("unexpected end of data")
          dst.write(buf)
  
      if remainder != 0:
          buf = src.read(remainder)
          if len(buf) < remainder:
              raise exception("unexpected end of data")
          dst.write(buf)
      return
docs: Copy length bytes from fileobj src to fileobj dst.
         If length is None, copy the entire content.