docstr: Returns run-to-tags dict from run-to-event-generator dict.
docstr_tok: ["Returns","run-to-tags","dict","from","run-to-event-generator","dict","."]
code: def _extract_run_to_tags(self, run_to_events):
      """Returns run-to-tags dict from run-to-event-generator dict."""
      run_to_tags = {}
      for run_name, event_generator in run_to_events.items():
          # There should be no duplicate runs.
          self.assertNotIn(run_name, run_to_tags)
          run_to_tags[run_name] = self._extract_tags(event_generator)
      return run_to_tags
  
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 3 for calling the LogdirLoaderTest obj's underlying member method code with example usage: obj._extract_run_to_tags(run_to_events) and returns: run_to_tags