code: def read_keyframe_helper_data(fpath: str):
      """
      Read keyframe data from a file in CSV format: the header should contain
      "video_id" and "keyframes" fields. Value specifications are:
        video_id: int
        keyframes: list(int)
      Example of contents:
        video_id,keyframes
        2,"[1,11,21,31,41,51,61,71,81]"
  
      Args:
          fpath (str): File containing keyframe data
  
      Return:
          video_id_to_keyframes (dict: int -> list(int)): for a given video ID it
            contains a list of keyframes for that video
      """
      video_id_to_keyframes = {}
      try:
          with PathManager.open(fpath, "r") as io:
              csv_reader = csv.reader(io)
              header = next(csv_reader)
              video_id_idx = header.index("video_id")
              keyframes_idx = header.index("keyframes")
              for row in csv_reader:
                  video_id = int(row[video_id_idx])
                  assert (
                      video_id not in video_id_to_keyframes
                  ), f"Duplicate keyframes entry for video {fpath}"
                  video_id_to_keyframes[video_id] = (
                      [
                          int(v)
                          for v in row[keyframes_idx][1:-1].split(",")
                      ]
                      if len(row[keyframes_idx]) > 2
                      else []
                  )
      except Exception as e:
          logger = logging.getLogger(__name__)
          logger.warning(
              f"Error reading keyframe helper data from {fpath}: {e}"
          )
      return video_id_to_keyframes
  
file_path: detectron2/projects/DensePose/densepose/data/video/video_keyframe_dataset.py
imports: import csv
  import logging
  import numpy
  from typing import Any, Callable, Dict, List, Optional, Union
  import av
  import torch
  from torch.utils.data.dataset import Dataset
  from detectron2.utils.file_io import PathManager
  from ..utils import maybe_prepend_base_path
  from .frame_selector import FrameSelector, FrameTsList
label_desc: Use image node_id 4 for calling a global function with example usage: read_keyframe_helper_data(fpath) and returns: video_id_to_keyframes