code: def testDoesntCrashWhenUpcomingFileIsDeleted(self):
      # Use actual file loader so it emits the real error.
      self._loader = directory_loader.DirectoryLoader(
          self._directory, event_file_loader.TimestampedEventFileLoader
      )
      with test_util.FileWriter(
          self._directory, filename_suffix=".a"
      ) as writer_a:
          writer_a.add_test_summary("a")
      with test_util.FileWriter(
          self._directory, filename_suffix=".b"
      ) as writer_b:
          writer_b.add_test_summary("b")
      generator = self._loader.Load()
      next(generator)  # Ignore the file_version event.
      event = next(generator)
      self.assertEqual("a", event.summary.value[0].tag)
      os.remove(glob.glob(os.path.join(self._directory, "*.b"))[0])
      self.assertEmpty(list(generator))
  
imports: import functools
  import glob
  import os
  import shutil
  from unittest import mock
  import tensorflow
  from tensorboard.backend.event_processing import directory_loader
  from tensorboard.backend.event_processing import directory_watcher
  from tensorboard.backend.event_processing import event_file_loader
  from tensorboard.backend.event_processing import io_wrapper
  from tensorboard.util import test_util
label_desc: Use image node_id 13 for calling the DirectoryLoaderTest obj's underlying member method code with example usage: obj.testDoesntCrashWhenUpcomingFileIsDeleted() without return types