docstr: Gets a subclip from a list of videos.
  
  Arguments:
      idx (int): index of the subclip. Must be between 0 and num_clips().
  
  Returns:
      video (Tensor)
      audio (Tensor)
      info (Dict)
      video_idx (int): index of the video in `video_paths`
docstr_tok: ["Gets","a","subclip","from","a","list","of","videos",".","Arguments",":","idx","(","int",")",":","index","of","the","subclip",".","Must","be","between","0","and","num_clips","(",")",".","Returns",":","video","(","Tensor",")","audio","(","Tensor",")","info","(","Dict",")","video_idx","(","int",")",":","index","of","the","video","in","`","video_paths","`"]
code: def get_clip(self, idx):
      """
      Gets a subclip from a list of videos.
  
      Arguments:
          idx (int): index of the subclip. Must be between 0 and num_clips().
  
      Returns:
          video (Tensor)
          audio (Tensor)
          info (Dict)
          video_idx (int): index of the video in `video_paths`
      """
      if idx >= self.num_clips():
          raise IndexError(
              "Index {} out of range "
              "({} number of clips)".format(idx, self.num_clips())
          )
      video_path = self.video_paths[idx]
      clip_pts = self.clips[idx]
  
      from torchvision import get_video_backend
  
      backend = get_video_backend()
  
      if backend == "pyav":
          # check for invalid options
          if self._video_width != 0:
              raise ValueError(
                  "pyav backend doesn't support _video_width != 0"
              )
          if self._video_height != 0:
              raise ValueError(
                  "pyav backend doesn't support _video_height != 0"
              )
          if self._video_min_dimension != 0:
              raise ValueError(
                  "pyav backend doesn't support _video_min_dimension != 0"
              )
          if self._video_max_dimension != 0:
              raise ValueError(
                  "pyav backend doesn't support _video_max_dimension != 0"
              )
          if self._audio_samples != 0:
              raise ValueError(
                  "pyav backend doesn't support _audio_samples != 0"
              )
  
      if backend == "pyav":
          assert len(clip_pts) > 0
          start_pts = clip_pts[0].item()
          end_pts = clip_pts[-1].item()
          video, audio, info = read_video(
              video_path, start_pts, end_pts
          )
      else:
          raise NotImplementedError(
              f"backend {backend} is not implemented."
          )
  
      resampling_idx = self.resampling_idxs[idx]
      if isinstance(resampling_idx, torch.Tensor):
          resampling_idx = resampling_idx - resampling_idx[0]
      video = video[resampling_idx]
      info["video_fps"] = self.frame_rate
      assert len(video) == self.num_frames, "{} x {}".format(
          video.shape, self.num_frames
      )
      return video, audio, info
  
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 6 for calling the CharadesVideoClips obj's underlying member method code with example usage: obj.get_clip(idx) and returns: video,  audio,  info