code: def reverse_fd(inf, outf):
      '''Reverse the content of inf, write to outf.
      Both inf and outf are file objects.
      inf must be seekable.
      '''
      inf.seek(0, 2)
      size = inf.tell()
      if not size:
          return
  
      chunks = split_size(size)
      for chunk in reversed(chunks):
          inf.seek(chunk[0], 0)
          data = inf.read(chunk[1])
          if len(data) != chunk[1]:
              raise IOError('incomplete I/O operation')
          outf.write(data[::-1]f reverse_fd(inf, outf):
      '''Reverse the content of inf, write to outf.
      Both inf and outf are file objects.
      inf must be seekable.
      '''
      inf.seek(0, 2)
      size = inf.tell()
      if not size:
          return
  
      chunks = split_size(size)
      for chunk in reversed(chunks):
          inf.seek(chunk[0], 0)
          data = inf.read(chunk[1])
          if len(data) != chunk[1]:
              raise IOError('incomplete I/O operation')
          outf.write(data[::-1])
docs: Reverse the content of inf, write to outf.
      Both inf and outf are file objects.
      inf must be seekable.