code: def select_clips_from_video(video_pts, num_frames, fps, frame_rate):
      # this function replaces compute_clips_for_video from original Kinetics400
      # it yields one clip with evenly separated num_frames
      if fps is None:
          # if for some reason the video doesn't have fps
          # (because doesn't have a video stream) set the fps to 1.
          # The value doesn't matter, because video_pts is empty anyway
          fps = 1
      if frame_rate is None:
          frame_rate = fps
  
      idxs = torch.round(
          torch.linspace(0, len(video_pts) - 1, num_frames)
      ).type(torch.LongTensor)
  
      video_pts = video_pts[idxs]
  
      return video_pts, idxs
  
file_path: mmf/mmf/datasets/builders/charades/_utils.py
imports: import logging
  import tempfile
  from pathlib import Path
  import pandas
  import torch
  from torchvision.datasets.video_utils import VideoClips
  from torchvision.io import read_video
label_desc: Use image node_id 1 for calling the CharadesVideoClips obj's underlying member method code with example usage: obj.select_clips_from_video(video_pts, num_frames, fps, frame_rate) and returns: video_pts,  idxs