class_docstr: Writes `Event` protocol buffers to an event file.
code: def _write_serialized_event(self, event_str):
      with self._lock:
          self._num_outstanding_events += 1
          self._py_recordio_writer.write(event_str)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import os
  import socket
  import threading
  import time
  import multiprocessing
  import queue
  from .proto import event_pb2
  from .record_writer import RecordWriter, directory_check
label_desc: Use image node_id 3 for calling the EventsWriter obj's underlying member method code with example usage: obj._write_serialized_event(event_str) without return types