code: def test_multiple_writes_to_logdir(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, "b", "x")
      ) as writer:
          writer.add_test_summary("tag_b_x")
      writer_c = test_util.FileWriter(os.path.join(logdir, "c"))
      writer_c.add_test_summary("tag_c")
      writer_c.flush()
      loader = self._create_logdir_loader(logdir)
      loader.synchronize_runs()
      self.assertEqual(
          self._extract_run_to_tags(loader.get_run_events()),
          {
              "a": ["tag_a"],
              "b": ["tag_b"],
              "b/x": ["tag_b_x"],
              "c": ["tag_c"],
          },
      )
      # A second load should indicate no new data.
      self.assertEqual(
          self._extract_run_to_tags(loader.get_run_events()),
          {"a": [], "b": [], "b/x": [], "c": []},
      )
      # Write some new data to both new and pre-existing event files.
      with test_util.FileWriter(
          os.path.join(logdir, "a"), filename_suffix=".other"
      ) as writer:
          writer.add_test_summary("tag_a_2")
          writer.add_test_summary("tag_a_3")
          writer.add_test_summary("tag_a_4")
      with test_util.FileWriter(
          os.path.join(logdir, "b", "x"), filename_suffix=".other"
      ) as writer:
          writer.add_test_summary("tag_b_x_2")
      with writer_c as writer:
          writer.add_test_summary("tag_c_2")
      # New data should appear on the next load.
      self.assertEqual(
          self._extract_run_to_tags(loader.get_run_events()),
          {
              "a": ["tag_a_2", "tag_a_3", "tag_a_4"],
              "b": [],
              "b/x": ["tag_b_x_2"],
              "c": ["tag_c_2"],
          },
      )
  
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 6 for calling the LogdirLoaderTest obj's underlying member method code with example usage: obj.test_multiple_writes_to_logdir() without return types