class_docstr: Extension of torchvision's VideoClips class that also returns the masks for each clip.
  
  Subclasses should implement the get_mask method. By default, the class inherits the functionality of VideoClips,
  which assumes that video_paths is a list of video files. If custom behaviour is required (e.g. video_paths is a list
  of folders with single-frame images), the subclass should implement at least get_clip and _compute_frame_pts.
  
  Args:
      video_paths (list[str]): List of video paths that make up the dataset.
      mask_paths (list[str]): List of paths to the masks for each video in the dataset.
class_docstr_tok: ["Extension","of","torchvision","'s","VideoClips","class","that","also","returns","the","masks","for","each","clip",".","Subclasses","should","implement","the","get_mask","method",".","By","default",",","the","class","inherits","the","functionality","of","VideoClips",",","which","assumes","that","video_paths","is","a","list","of","video","files",".","If","custom","behaviour","is","required","(","e.g",".","video_paths","is","a","list","of","folders","with","single-frame","images",")",",","the","subclass","should","implement","at","least","get_clip","and","_compute_frame_pts",".","Args",":","video_paths","(","list","[","str","]",")",":","List","of","video","paths","that","make","up","the","dataset",".","mask_paths","(","list","[","str","]",")",":","List","of","paths","to","the","masks","for","each","video","in","the","dataset","."]
docstr: Return a dictionary containing the clip, mask, video path and frame indices.
docstr_tok: ["Return","a","dictionary","containing","the","clip",",","mask",",","video","path","and","frame","indices","."]
code: def get_item(self, idx: int) -> dict[str, Any]:
      """Return a dictionary containing the clip, mask, video path and frame indices."""
      with warnings.catch_warnings():
          # silence warning caused by bug in torchvision, see https://github.com/pytorch/vision/issues/5787
          warnings.simplefilter("ignore")
          clip, _, _, _ = self.get_clip(idx)
  
      video_idx, clip_idx = self.get_clip_location(idx)
      video_path = self.video_paths[video_idx]
      clip_pts = self.clips[video_idx][clip_idx]
  
      item = dict(
          image=clip,
          mask=self.get_mask(idx),
          video_path=video_path,
          frames=clip_pts,
          last_frame=self.last_frame_idx(video_idx),
      )
  
      return item
  
file_path: anomalib/src/anomalib/data/utils/video.py
imports: from __future__ import annotations
  import warnings
  from abc import ABC, abstractmethod
  from pathlib import Path
  from typing import Any
  import cv2
  from torch import Tensor
  from torchvision.datasets.video_utils import VideoClips
label_desc: Use image node_id 4 for calling the ClipsIndexer obj's underlying member method code with example usage: obj.get_item(idx) and returns: item