code: def write_event(self, event):
          
  
          if not self.header_written:
              self._out.write("<stream>")
              self.header_written = True
  
          event.write_to(self._out)
docs: Writes an ``Event`` object to Splunk.
  
          :param event: An ``Event`` object.