code: def get_label_map_dict(label_map_path, use_display_name=False):
      """Reads a label map and returns a dictionary of label names to id.
  
      Args:
        label_map_path: path to label_map.
        use_display_name: whether to use the label map items' display names as keys.
  
      Returns:
        A dictionary mapping label names to id.
      """
      label_map = load_labelmap(label_map_path)
      label_map_dict = {}
      for item in label_map.item:
          if use_display_name:
              label_map_dict[item.display_name] = item.id
          else:
              label_map_dict[item.name] = item.id
      return label_map_dict
  
file_path: SlowFast/ava_evaluation/label_map_util.py
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import logging
label_desc: Use image node_id 6 for calling a global function with example usage: get_label_map_dict(label_map_path, use_display_name) and returns: label_map_dict