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 pending events and closes the writer after it is done.
docstr_tok: ["Flushes","the","pending","events","and","closes","the","writer","after","it","is","done","."]
code: def close(self):
      """Flushes the pending events and closes the writer after it is done."""
      self.flush()
      if self._recordio_writer is not None:
          self._recordio_writer.close()
          self._recordio_writer = None
  
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 8 for calling the EventsWriter obj's underlying member method code with example usage: obj.close() without return types