code: def _get_tag_description_info(mapping):
      """Gets maps from tags to descriptions, and descriptions to runs.
  
      Args:
          mapping: a nested map `d` such that `d[run][tag]` is a time series
            produced by DataProvider's `list_*` methods.
  
      Returns:
          A tuple containing
              tag_to_descriptions: A map from tag strings to a set of description
                  strings.
              description_to_runs: A map from description strings to a set of run
                  strings.
      """
      tag_to_descriptions = collections.defaultdict(set)
      description_to_runs = collections.defaultdict(set)
      for run, tag_to_content in mapping.items():
          for tag, metadatum in tag_to_content.items():
              description = metadatum.description
              if len(description):
                  tag_to_descriptions[tag].add(description)
                  description_to_runs[description].add(run)
  
      return tag_to_descriptions, description_to_runs
  
imports: import collections
  import imghdr
  import json
  from werkzeug import wrappers
  from tensorboard import errors
  from tensorboard import plugin_util
  from tensorboard.backend import http_util
  from tensorboard.data import provider
  from tensorboard.plugins import base_plugin
  from tensorboard.plugins.histogram import metadata
  from tensorboard.plugins.image import metadata
  from tensorboard.plugins.metrics import metadata
  from tensorboard.plugins.scalar import metadata
label_desc: Use image node_id 1 for calling a global function with example usage: _get_tag_description_info(mapping) and returns: tag_to_descriptions,  description_to_runs