class_docstr: Pre-processor for Ava Actions Dataset stored as image frames -
      `<https://research.google.com/ava/download.html>_`
  This class handles the parsing of all the necessary
  csv files containing frame paths and frame labels.
class_docstr_tok: ["Pre-processor","for","Ava","Actions","Dataset","stored","as","image","frames","-","`","<","https",":","\/\/research.google.com\/ava\/download.html",">","_","`","This","class","handles","the","parsing","of","all","the","necessary","csv","files","containing","frame","paths","and","frame","labels","."]
docstr: Read label map and class ids.
  Args:
      label_map_file (str): Path to a .pbtxt containing class id's
          and class names
  Returns:
      (tuple): A tuple of the following,
          label_map (dict): A dictionary mapping class id to
              the associated class names.
          class_ids (set): A set of integer unique class id's
docstr_tok: ["Read","label","map","and","class","ids",".","Args",":","label_map_file","(","str",")",":","Path","to","a",".pbtxt","containing","class","id's","and","class","names","Returns",":","(","tuple",")",":","A","tuple","of","the","following",",","label_map","(","dict",")",":","A","dictionary","mapping","class","id","to","the","associated","class","names",".","class_ids","(","set",")",":","A","set","of","integer","unique","class","id","'s"]
code: def read_label_map(label_map_file: str) -> Tuple:
      """
      Read label map and class ids.
      Args:
          label_map_file (str): Path to a .pbtxt containing class id's
              and class names
      Returns:
          (tuple): A tuple of the following,
              label_map (dict): A dictionary mapping class id to
                  the associated class names.
              class_ids (set): A set of integer unique class id's
      """
      label_map = {}
      class_ids = set()
      name = ""
      class_id = ""
      with g_pathmgr.open(label_map_file, "r") as f:
          for line in f:
              if line.startswith("  name:"):
                  name = line.split('"')[1]
              elif line.startswith("  id:") or line.startswith(
                  "  label_id:"
              ):
                  class_id = int(line.strip().split(" ")[-1])
                  label_map[class_id] = name
                  class_ids.add(class_id)
      return label_map, class_ids
  
file_path: pytorchvideo/pytorchvideo/data/ava.py
imports: from __future__ import annotations
  import os
  from collections import defaultdict
  from typing import Any, Callable, Dict, Optional, Set, Tuple, Type
  import torch
  from iopath.common.file_io import g_pathmgr
  from pytorchvideo.data.clip_sampling import ClipInfo, ClipSampler
  from pytorchvideo.data.labeled_video_dataset import LabeledVideoDataset
label_desc: Use image node_id 5 for calling the AvaLabeledVideoFramePaths obj's underlying member method code with example usage: obj.read_label_map(label_map_file) and returns: label_map,  class_ids