code: def to_csv(self, path, mode=WRITE_MODE, dialect='excel', compression=None,
                 newline='', **fmtparams):
          
  
          if 'b' in mode:
              newline = None
  
          with universal_write_open(path, mode=mode, compression=compression,
                                    newline=newline) as output:
              csv_writer = csv.writer(output, dialect=dialect, **fmtparams)
              for row in self:
                  csv_writer.writerow([six.u(str(element)) for element in row])
docs: Saves the sequence to a csv file. Each element should be an iterable which will be expanded
          to the elements of each row.
  
          :param path: path to write file
          :param mode: file open mode
          :param dialect: passed to csv.writer
          :param fmtparams: passed to csv.writer