class_docstr: Writes `Event` protocol buffers to an event file. This class is ported from
  EventsWriter defined in
  https://github.com/tensorflow/tensorflow/blob/master/tensorflow/core/util/events_writer.cc
class_docstr_tok: ["Writes","`","Event","`","protocol","buffers","to","an","event","file",".","This","class","is","ported","from","EventsWriter","defined","in","https",":","\/\/github.com\/tensorflow\/tensorflow\/blob\/master\/tensorflow\/core\/util\/events_writer.cc"]
docstr: Flushes the event file to disk.
docstr_tok: ["Flushes","the","event","file","to","disk","."]
code: def flush(self):
      """Flushes the event file to disk."""
      if (
          self._num_outstanding_events == 0
          or self._recordio_writer is None
      ):
          return
      self._recordio_writer.flush()
      if self._logger is not None:
          self._logger.info(
              "wrote %d %s to disk",
              self._num_outstanding_events,
              "event"
              if self._num_outstanding_events == 1
              else "events",
          )
      self._num_outstanding_events = 0
  
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 7 for calling the EventsWriter obj's underlying member method code with example usage: obj.flush() without return types