code: def test_directory_deletion(self):
      logdir = self.get_temp_dir()
      with test_util.FileWriter(os.path.join(logdir, "a")) as writer:
          writer.add_test_summary("tag_a")
      with test_util.FileWriter(os.path.join(logdir, "b")) as writer:
          writer.add_test_summary("tag_b")
      with test_util.FileWriter(os.path.join(logdir, "c")) as writer:
          writer.add_test_summary("tag_c")
      loader = self._create_logdir_loader(logdir)
      loader.synchronize_runs()
      self.assertEqual(
          list(loader.get_run_events().keys()), ["a", "b", "c"]
      )
      shutil.rmtree(os.path.join(logdir, "b"))
      loader.synchronize_runs()
      self.assertEqual(list(loader.get_run_events().keys()), ["a", "c"])
      shutil.rmtree(logdir)
      loader.synchronize_runs()
      self.assertEmpty(loader.get_run_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 7 for calling the LogdirLoaderTest obj's underlying member method code with example usage: obj.test_directory_deletion() without return types