class_docstr: Writes bytes to a file.
docstr: Closes the underlying writer, flushing any pending writes first.
docstr_tok: ["Closes","the","underlying","writer",",","flushing","any","pending","writes","first","."]
code: def close(self):
      """Closes the underlying writer, flushing any pending writes first."""
      if not self._closed:
          with self._lock:
              if not self._closed:
                  self._closed = True
                  self._worker.stop()
                  self._writer.flush()
                  self._writer.close()
  
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 4 for calling the _AsyncWriter obj's underlying member method code with example usage: obj.close() without return types