code: def test_directory_deletion_during_event_loading(self):
      logdir = self.get_temp_dir()
      with test_util.FileWriter(logdir) as writer:
          writer.add_test_summary("foo")
      loader = self._create_logdir_loader(logdir)
      loader.synchronize_runs()
      self.assertEqual(
          self._extract_run_to_tags(loader.get_run_events()),
          {".": ["foo"]},
      )
      shutil.rmtree(logdir)
      runs_to_events = loader.get_run_events()
      self.assertEqual(list(runs_to_events.keys()), ["."])
      events = runs_to_events["."]
      self.assertEqual(self._extract_tags(events), [])
  
file_path: tensorboard/tensorboard/uploader/logdir_loader_test.py
imports: import os.path
  import shutil
  from tensorboard.uploader import logdir_loader
  from tensorboard import test
  from tensorboard.backend.event_processing import directory_loader
  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 8 for calling the LogdirLoaderTest obj's underlying member method code with example usage: obj.test_directory_deletion_during_event_loading() without return types