code: def emit(self, value):
      
      if not self._tstate.output_writer:
        logging.error("emit is called, but no output writer is set.")
        return
      self._tstate.output_writer.write(value)
docs: Emits a value to output writer.
  
      Args:
        value: a value of type expected by the output writer.