class_docstr: Directly get the key frame, no reference frames.
  
  Args:
      collect_video_keys (list[str]): The keys of video info to be
          collected.
class_docstr_tok: ["Directly","get","the","key","frame",",","no","reference","frames",".","Args",":","collect_video_keys","(","list","[","str","]",")",":","The","keys","of","video","info","to","be","collected","."]
docstr: Prepare data for the subsequent pipeline.
  
  Args:
      video_infos (dict): The whole video information.
      sampled_inds (list[int]): The sampled frame indices.
  
  Returns:
      dict: The processed data information.
docstr_tok: ["Prepare","data","for","the","subsequent","pipeline",".","Args",":","video_infos","(","dict",")",":","The","whole","video","information",".","sampled_inds","(","list","[","int","]",")",":","The","sampled","frame","indices",".","Returns",":","dict",":","The","processed","data","information","."]
code: def prepare_data(
      self, video_infos: dict, sampled_inds: List[int]
  ) -> Dict[str, List]:
      """Prepare data for the subsequent pipeline.
  
      Args:
          video_infos (dict): The whole video information.
          sampled_inds (list[int]): The sampled frame indices.
  
      Returns:
          dict: The processed data information.
      """
      frames_anns = video_infos["images"]
      final_data_info = defaultdict(list)
      # for data in frames_anns:
      for index in sampled_inds:
          data = frames_anns[index]
          # copy the info in video-level into img-level
          for key in self.collect_video_keys:
              if key == "video_length":
                  data["ori_video_length"] = video_infos[key]
                  data["video_length"] = len(sampled_inds)
              else:
                  data[key] = video_infos[key]
          # Collate data_list (list of dict to dict of list)
          for key, value in data.items():
              final_data_info[key].append(value)
  
      return final_data_info
  
file_path: mmdetection/mmdet/datasets/transforms/frame_sampling.py
imports: import random
  from collections import defaultdict
  from typing import Dict, List, Optional, Union
  from mmcv.transforms import BaseTransform
  from mmdet.registry import TRANSFORMS
label_desc: Use image node_id 2 for calling the BaseFrameSample obj's underlying member method code with example usage: obj.prepare_data(video_infos, sampled_inds) and returns: final_data_info