class_docstr: Action recognition video dataset for
  `Charades <https://prior.allenai.org/projects/charades>`_ stored as image frames.
  
  This dataset handles the parsing of frames, loading and clip sampling for the
  videos. All io is done through :code:`iopath.common.file_io.PathManager`, enabling
  non-local storage uri's to be used.
class_docstr_tok: ["Action","recognition","video","dataset","for","`","Charades","<","https",":","\/\/prior.allenai.org\/projects\/charades",">","`","_","stored","as","image","frames",".","This","dataset","handles","the","parsing","of","frames",",","loading","and","clip","sampling","for","the","videos",".","All","io","is","done","through",":","code",":","`","iopath.common.file_io.PathManager","`",",","enabling","non-local","storage","uri","'s","to","be","used","."]
docstr: Args:
      frame_indices (list): list of frame indices.
      frames_per+clip (int): The number of frames per clip to sample.
  
  Returns:
      (list): Outputs a subsampled list with num_samples frames.
docstr_tok: ["Args",":","frame_indices","(","list",")",":","list","of","frame","indices",".","frames_per+clip","(","int",")",":","The","number","of","frames","per","clip","to","sample",".","Returns",":","(","list",")",":","Outputs","a","subsampled","list","with","num_samples","frames","."]
code: def _sample_clip_frames(
      frame_indices: List[int], frames_per_clip: int
  ) -> List[int]:
      """
      Args:
          frame_indices (list): list of frame indices.
          frames_per+clip (int): The number of frames per clip to sample.
  
      Returns:
          (list): Outputs a subsampled list with num_samples frames.
      """
      num_frames = len(frame_indices)
      indices = torch.linspace(0, num_frames - 1, frames_per_clip)
      indices = torch.clamp(indices, 0, num_frames - 1).long()
  
      return [frame_indices[idx] for idx in indices]
  
file_path: pytorchvideo/pytorchvideo/data/charades.py
imports: import csv
  import functools
  import itertools
  import os
  from collections import defaultdict
  from typing import Any, Callable, List, Optional, Tuple, Type
  import torch
  import torch.utils.data
  from iopath.common.file_io import g_pathmgr
  from pytorchvideo.data.clip_sampling import ClipSampler
  from pytorchvideo.data.frame_video import FrameVideo
  from .utils import MultiProcessSampler
label_desc: Use image node_id 2 for calling the Charades obj's underlying member method code with example usage: obj._sample_clip_frames(frame_indices, frames_per_clip) and returns: unknown