code: def test_event_file_writer_roundtrip(self):
      _TAGNAME = "dummy"
      _DUMMY_VALUE = 42
      logdir = self.get_temp_dir()
      w = EventFileWriter(logdir)
      summary = Summary(
          value=[Summary.Value(tag=_TAGNAME, simple_value=_DUMMY_VALUE)]
      )
      fakeevent = event_pb2.Event(summary=summary)
      w.add_event(fakeevent)
      w.close()
      event_files = sorted(glob.glob(os.path.join(logdir, "*")))
      self.assertEqual(len(event_files), 1)
      r = PyRecordReader_New(event_files[0])
      r.GetNext()  # meta data, so skip
      r.GetNext()
      self.assertEqual(fakeevent.SerializeToString(), r.record())
  
imports: import glob
  import os
  import threading
  import time
  from typing import Optional
  from unittest.mock import MagicMock
  from tensorboard.summary.writer.event_file_writer import EventFileWriter
  from tensorboard.summary.writer.event_file_writer import _AsyncWriter
  from tensorboard.compat.proto import event_pb2
  from tensorboard.compat.proto.summary_pb2 import Summary
  from tensorboard.compat.tensorflow_stub.pywrap_tensorflow import PyRecordReader_New
  from tensorboard import test
label_desc: Use image node_id 1 for calling the EventFileWriterTest obj's underlying member method code with example usage: obj.test_event_file_writer_roundtrip() without return types