code: def test_video_clips(self, tmpdir):
      video_list = get_list_of_videos(tmpdir, num_videos=3)
      video_clips = VideoClips(video_list, 5, 5, num_workers=2)
      assert video_clips.num_clips() == 1 + 2 + 3
      for i, (v_idx, c_idx) in enumerate(
          [(0, 0), (1, 0), (1, 1), (2, 0), (2, 1), (2, 2)]
      ):
          video_idx, clip_idx = video_clips.get_clip_location(i)
          assert video_idx == v_idx
          assert clip_idx == c_idx
  
      video_clips = VideoClips(video_list, 6, 6)
      assert video_clips.num_clips() == 0 + 1 + 2
      for i, (v_idx, c_idx) in enumerate([(1, 0), (2, 0), (2, 1)]):
          video_idx, clip_idx = video_clips.get_clip_location(i)
          assert video_idx == v_idx
          assert clip_idx == c_idx
  
      video_clips = VideoClips(video_list, 6, 1)
      assert video_clips.num_clips() == 0 + (10 - 6 + 1) + (15 - 6 + 1)
      for i, v_idx, c_idx in [
          (0, 1, 0),
          (4, 1, 4),
          (5, 2, 0),
          (6, 2, 1),
      ]:
          video_idx, clip_idx = video_clips.get_clip_location(i)
          assert video_idx == v_idx
          assert clip_idx == c_idx
  
file_path: vision/test/test_datasets_video_utils.py
imports: import pytest
  import torch
  from common_utils import assert_equal, get_list_of_videos
  from torchvision import io
  from torchvision.datasets.video_utils import unfold, VideoClips
label_desc: Use image node_id 2 for calling the TestVideo obj's underlying member method code with example usage: obj.test_video_clips(tmpdir) without return types