code: def get_num_boxes_used(keyframe_indices, keyframe_boxes_and_labels):
      """
      Get total number of used boxes.
  
      Args:
          keyframe_indices (list): a list of indices of the keyframes.
          keyframe_boxes_and_labels (list[list[list]]): a list of list which maps from
              video_idx and sec_idx to a list of boxes and corresponding labels.
  
      Returns:
          count (int): total number of used boxes.
      """
  
      count = 0
      for video_idx, sec_idx, _, _ in keyframe_indices:
          count += len(keyframe_boxes_and_labels[video_idx][sec_idx])
      return count
  
file_path: SlowFast/slowfast/datasets/ava_helper.py
imports: import logging
  import os
  from collections import defaultdict
  from slowfast.utils.env import pathmgr
label_desc: Use image node_id 4 for calling a global function with example usage: get_num_boxes_used(keyframe_indices, keyframe_boxes_and_labels) and returns: count