class_docstr: Uniformly sample reference frames.
  
  Args:
      num_ref_imgs (int): Number of reference frames to be sampled.
      frame_range (int | list[int]): Range of frames to be sampled around
          key frame. If int, the range is [-frame_range, frame_range].
          Defaults to 10.
      filter_key_img (bool): Whether to filter the key frame when
          sampling reference frames. Defaults to True.
      collect_video_keys (list[str]): The keys of video info to be
          collected.
class_docstr_tok: ["Uniformly","sample","reference","frames",".","Args",":","num_ref_imgs","(","int",")",":","Number","of","reference","frames","to","be","sampled",".","frame_range","(","int","|","list","[","int","]",")",":","Range","of","frames","to","be","sampled","around","key","frame",".","If","int",",","the","range","is","[","-frame_range",",","frame_range","]",".","Defaults","to","10.","filter_key_img","(","bool",")",":","Whether","to","filter","the","key","frame","when","sampling","reference","frames",".","Defaults","to","True",".","collect_video_keys","(","list","[","str","]",")",":","The","keys","of","video","info","to","be","collected","."]
docstr: Transform the video information.
  
  Args:
      video_infos (dict): The whole video information.
  
  Returns:
      dict: The data information of the sampled frames.
docstr_tok: ["Transform","the","video","information",".","Args",":","video_infos","(","dict",")",":","The","whole","video","information",".","Returns",":","dict",":","The","data","information","of","the","sampled","frames","."]
code: def transform(self, video_infos: dict) -> Optional[Dict[str, List]]:
      """Transform the video information.
  
      Args:
          video_infos (dict): The whole video information.
  
      Returns:
          dict: The data information of the sampled frames.
      """
      if "key_frame_id" in video_infos:
          key_frame_id = video_infos["key_frame_id"]
          assert isinstance(video_infos["key_frame_id"], int)
      else:
          key_frame_id = random.sample(
              list(range(video_infos["video_length"])), 1
          )[0]
  
      (sampled_frames_ids, key_frame_flags) = self.sampling_frames(
          video_infos["video_length"], key_frame_id=key_frame_id
      )
      results = self.prepare_data(video_infos, sampled_frames_ids)
      results["key_frame_flags"] = key_frame_flags
  
      return results
  
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 3 for calling the UniformRefFrameSample obj's underlying member method code with example usage: obj.transform(video_infos) and returns: results