code: def create_category_index(categories):
      """Creates dictionary of COCO compatible categories keyed by category id.
  
      Args:
        categories: a list of dicts, each of which has the following keys:
          'id': (required) an integer id uniquely identifying this category.
          'name': (required) string representing category name
            e.g., 'cat', 'dog', 'pizza'.
  
      Returns:
        category_index: a dict containing the same entries as categories, but keyed
          by the 'id' field of each category.
      """
      category_index = {}
      for cat in categories:
          category_index[cat["id"]] = cat
      return category_index
  
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 2 for calling a global function with example usage: create_category_index(categories) and returns: category_index