class_docstr: Write CSV files a line at a time.
  
  Arguments
  ---------
  outstream : file-object
      A writeable stream
  data_fields : list
      List of the optional keys to write. Each key will be expanded to the
      SpeechBrain format, producing three fields: key, key_format, key_opts.
  
  Example
  -------
  >>> import io
  >>> f = io.StringIO()
  >>> writer = IterativeCSVWriter(f, ["phn"])
  >>> print(f.getvalue())
  ID,duration,phn,phn_format,phn_opts
  >>> writer.write("UTT1",2.5,"sil hh ee ll ll oo sil","string","")
  >>> print(f.getvalue())
  ID,duration,phn,phn_format,phn_opts
  UTT1,2.5,sil hh ee ll ll oo sil,string,
  >>> writer.write(ID="UTT2",phn="sil ww oo rr ll dd sil",phn_format="string")
  >>> print(f.getvalue())
  ID,duration,phn,phn_format,phn_opts
  UTT1,2.5,sil hh ee ll ll oo sil,string,
  UTT2,,sil ww oo rr ll dd sil,string,
  >>> writer.set_default('phn_format', 'string')
  >>> writer.write_batch(ID=["UTT3","UTT4"],phn=["ff oo oo", "bb aa rr"])
  >>> print(f.getvalue())
  ID,duration,phn,phn_format,phn_opts
  UTT1,2.5,sil hh ee ll ll oo sil,string,
  UTT2,,sil ww oo rr ll dd sil,string,
  UTT3,,ff oo oo,string,
  UTT4,,bb aa rr,string,
class_docstr_tok: ["Write","CSV","files","a","line","at","a","time",".","Arguments","--","--","--","--","-","outstream",":","file-object","A","writeable","stream","data_fields",":","list","List","of","the","optional","keys","to","write",".","Each","key","will","be","expanded","to","the","SpeechBrain","format",",","producing","three","fields",":","key",",","key_format",",","key_opts",".","Example","--","--","--","-",">",">",">","import","io",">",">",">","f","=","io.StringIO","(",")",">",">",">","writer","=","IterativeCSVWriter","(","f",",","[","``","phn","''","]",")",">",">",">","print","(","f.getvalue","(",")",")","ID",",","duration",",","phn",",","phn_format",",","phn_opts",">",">",">","writer.write","(","``","UTT1","''",",2.5",",","''","sil","hh","ee","ll","ll","oo","sil","''",",","''","string","''",",","''","''",")",">",">",">","print","(","f.getvalue","(",")",")","ID",",","duration",",","phn",",","phn_format",",","phn_opts","UTT1,2.5",",","sil","hh","ee","ll","ll","oo","sil",",","string",",",">",">",">","writer.write","(","ID=","''","UTT2","''",",","phn=","''","sil","ww","oo","rr","ll","dd","sil","''",",","phn_format=","''","string","''",")",">",">",">","print","(","f.getvalue","(",")",")","ID",",","duration",",","phn",",","phn_format",",","phn_opts","UTT1,2.5",",","sil","hh","ee","ll","ll","oo","sil",",","string",",","UTT2",",",",sil","ww","oo","rr","ll","dd","sil",",","string",",",">",">",">","writer.set_default","(","'phn_format","'",",","'string","'",")",">",">",">","writer.write_batch","(","ID=","[","``","UTT3","''",",","''","UTT4","''","]",",","phn=","[","``","ff","oo","oo","''",",","``","bb","aa","rr","''","]",")",">",">",">","print","(","f.getvalue","(",")",")","ID",",","duration",",","phn",",","phn_format",",","phn_opts","UTT1,2.5",",","sil","hh","ee","ll","ll","oo","sil",",","string",",","UTT2",",",",sil","ww","oo","rr","ll","dd","sil",",","string",",","UTT3",",",",ff","oo","oo",",","string",",","UTT4",",",",bb","aa","rr",",","string",","]
docstr: Sets a default value for the given CSV field.
  
  Arguments
  ---------
  field : str
      A field in the CSV.
  value
      The default value.
docstr_tok: ["Sets","a","default","value","for","the","given","CSV","field",".","Arguments","--","--","--","--","-","field",":","str","A","field","in","the","CSV",".","value","The","default","value","."]
code: def set_default(self, field, value):
      """Sets a default value for the given CSV field.
  
      Arguments
      ---------
      field : str
          A field in the CSV.
      value
          The default value.
      """
      if field not in self.fields:
          raise ValueError(f"{field} is not a field in this CSV!")
      self.defaults[field] = value
  
imports: import os
  import torch
  import logging
  import numpy
  import pickle
  import hashlib
  import csv
  import time
  import torchaudio
  import json
  import re
  from speechbrain.utils.torch_audio_backend import check_torchaudio_backend
label_desc: Use image node_id 2 for calling the IterativeCSVWriter obj's underlying member method code with example usage: obj.set_default(field, value) without return types