code: def create_category_index_from_labelmap(label_map_path):
      """Reads a label map and returns a category index.
  
      Args:
        label_map_path: Path to `StringIntLabelMap` proto text file.
  
      Returns:
        A category index, which is a dictionary that maps integer ids to dicts
        containing categories, e.g.
        {1: {'id': 1, 'name': 'dog'}, 2: {'id': 2, 'name': 'cat'}, ...}
      """
      label_map = load_labelmap(label_map_path)
      max_num_classes = max(item.id for item in label_map.item)
      categories = convert_label_map_to_categories(
          label_map, max_num_classes
      )
      return create_category_index(categories)
  
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 7 for calling a global function with example usage: create_category_index_from_labelmap(label_map_path) and returns: create_category_index