class_docstr: Writes `Event` protocol buffers to an event file.
  
  The `EventFileWriter` class creates an event file in the specified
  directory, and asynchronously writes Event protocol buffers to the
  file. The Event file is encoded using the tfrecord format, which is
  similar to RecordIO.
docstr: Adds an event to the event file.
  
  Args:
    event: An `Event` protocol buffer.
docstr_tok: ["Adds","an","event","to","the","event","file",".","Args",":","event",":","An","`","Event","`","protocol","buffer","."]
code: def add_event(self, event):
      """Adds an event to the event file.
  
      Args:
        event: An `Event` protocol buffer.
      """
      if not isinstance(event, event_pb2.Event):
          raise TypeError(
              "Expected an event_pb2.Event proto, "
              " but got %s" % type(event)
          )
      self._async_writer.write(event.SerializeToString())
  
imports: import os
  import queue
  import socket
  import threading
  import time
  from tensorboard.compat import tf
  from tensorboard.compat.proto import event_pb2
  from tensorboard.summary.writer.record_writer import RecordWriter
label_desc: Use image node_id 3 for calling the EventFileWriter obj's underlying member method code with example usage: obj.add_event(event) without return types