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.
  
  This class is not thread-safe.
docstr: Initializes or re-initializes the queue and writer thread.
  
  The EventsWriter itself does not need to be re-initialized explicitly,
  because it will auto-initialize itself if used after being closed.
docstr_tok: ["Initializes","or","re-initializes","the","queue","and","writer","thread",".","The","EventsWriter","itself","does","not","need","to","be","re-initialized","explicitly",",","because","it","will","auto-initialize","itself","if","used","after","being","closed","."]
code: def _initialize(self):
      """Initializes or re-initializes the queue and writer thread.
  
      The EventsWriter itself does not need to be re-initialized explicitly,
      because it will auto-initialize itself if used after being closed.
      """
      self._event_queue = CloseableQueue(self._max_queue)
      self._worker = _EventLoggerThread(
          self._event_queue,
          self._ev_writer,
          self._flush_secs,
          self._flush_complete,
          self._flush_sentinel,
          self._close_sentinel,
      )
  
      self._worker.start()
  
imports: import collections
  import os.path
  import sys
  import threading
  import time
  from tensorflow.python.client import _pywrap_events_writer
  from tensorflow.python.platform import gfile
  from tensorflow.python.platform import tf_logging
  from tensorflow.python.util import compat
label_desc: Use image node_id 2 for calling the EventFileWriter obj's underlying member method code with example usage: obj._initialize() without return types