class_docstr: This class is adapted from EventFileWriter in Tensorflow:
  https://github.com/tensorflow/tensorflow/blob/master/tensorflow/python/summary/writer/event_file_writer.py
  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.
class_docstr_tok: ["This","class","is","adapted","from","EventFileWriter","in","Tensorflow",":","https",":","\/\/github.com\/tensorflow\/tensorflow\/blob\/master\/tensorflow\/python\/summary\/writer\/event_file_writer.py","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: Creates a `EventFileWriter` and an event file to write to.
  On construction the summary writer creates a new event file in `logdir`.
  This event file will contain `Event` protocol buffers, which are written to
  disk via the add_event method.
  The other arguments to the constructor control the asynchronous writes to
  the event file:
docstr_tok: ["Creates","a","`","EventFileWriter","`","and","an","event","file","to","write","to",".","On","construction","the","summary","writer","creates","a","new","event","file","in","`","logdir","`",".","This","event","file","will","contain","`","Event","`","protocol","buffers",",","which","are","written","to","disk","via","the","add_event","method",".","The","other","arguments","to","the","constructor","control","the","asynchronous","writes","to","the","event","file",":"]
code: def __init__(
      self,
      logdir,
      max_queue=10,
      flush_secs=120,
      filename_suffix=None,
      verbose=True,
  ):
      """Creates a `EventFileWriter` and an event file to write to.
      On construction the summary writer creates a new event file in `logdir`.
      This event file will contain `Event` protocol buffers, which are written to
      disk via the add_event method.
      The other arguments to the constructor control the asynchronous writes to
      the event file:
      """
      self._logdir = logdir
      if not os.path.exists(self._logdir):
          os.makedirs(self._logdir)
      self._event_queue = six.moves.queue.Queue(max_queue)
      self._ev_writer = EventsWriter(
          os.path.join(self._logdir, "events"), verbose=verbose
      )
      self._flush_secs = flush_secs
      self._sentinel_event = _get_sentinel_event()
      if filename_suffix is not None:
          self._ev_writer.init_with_suffix(filename_suffix)
      self._closed = False
      self._worker = _EventLoggerThread(
          self._event_queue,
          self._ev_writer,
          self._flush_secs,
          self._sentinel_event,
      )
  
      self._worker.start()
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import logging
  import os.path
  import socket
  import threading
  import time
  import six
  from .proto import event_pb2
  from .record_writer import RecordWriter
label_desc: Use image node_id 1 to create a new EventFileWriter object from inherited base classes: object with example: obj = EventFileWriter(logdir, max_queue, flush_secs, filename_suffix, verbose)