code: def writerow(self, row):
          
          self.writer.writerow(row)
          # Fetch UTF-8 output from the queue ...
          data = self.queue.getvalue()
          # write to the target stream
          self.stream.write(data)
          # empty queue
          self.queue.truncate(0)
          self.queue.seek(0)
docs: Writes a row to the CSV file