code: def testSummaryIteratorEventsAddedAfterEndOfFile(self):
      test_dir = os.path.join(self.get_temp_dir(), "events")
      with writer.FileWriter(test_dir) as w:
          session_log_start = event_pb2.SessionLog.START
          w.add_session_log(
              event_pb2.SessionLog(status=session_log_start), 1
          )
          w.flush()
          path = glob.glob(os.path.join(test_dir, "event*"))[0]
          rr = summary_iterator.summary_iterator(path)
          # The first event should list the file_version.
          ev = next(rr)
          self.assertEqual("brain.Event:2", ev.file_version)
          # The next event should be the START message.
          ev = next(rr)
          self.assertEqual(1, ev.step)
          self.assertEqual(session_log_start, ev.session_log.status)
          # Reached EOF.
          self.assertRaises(StopIteration, lambda: next(rr))
          w.add_session_log(
              event_pb2.SessionLog(status=session_log_start), 2
          )
          w.flush()
          # The new event is read, after previously seeing EOF.
          ev = next(rr)
          self.assertEqual(2, ev.step)
          self.assertEqual(session_log_start, ev.session_log.status)
          # Get EOF again.
          self.assertRaises(StopIteration, lambda: next(rr))
  
file_path: tensorflow-upstream/tensorflow/python/summary/summary_iterator_test.py
imports: import glob
  import os.path
  from tensorflow.core.util import event_pb2
  from tensorflow.python.framework import test_util
  from tensorflow.python.platform import test
  from tensorflow.python.summary import summary_iterator
  from tensorflow.python.summary.writer import writer
label_desc: Use image node_id 1 for calling the SummaryIteratorTestCase obj's underlying member method code with example usage: obj.testSummaryIteratorEventsAddedAfterEndOfFile() without return types