code: def seek_file_end(file):
      '''Seek to the end of the file.'''
      try:
          file.seek(0, 2)
      except ValueError:
          # gzip files don't support seek from end
          while True:
              data = file.read(4096)
              if not data:
                  breaf seek_file_end(file):
      '''Seek to the end of the file.'''
      try:
          file.seek(0, 2)
      except ValueError:
          # gzip files don't support seek from end
          while True:
              data = file.read(4096)
              if not data:
                  break
docs: Seek to the end of the file.