code: def test__getitem__(self, dataset_type):
      with tempfile.TemporaryDirectory(
          prefix=f"{TestEpicKitchenDataset}"
      ) as tempdir:
          tempdir = Path(tempdir)
  
          video_info_file = tempdir / "test_video_info.csv"
          save_dataclass_objs_to_headered_csv(
              list(MOCK_VIDEO_INFOS.values()), video_info_file
          )
          action_file = tempdir / "action_video_info.csv"
          actions = []
          for action_list in self.ACTIONS_DATAS.values():
              for action in action_list:
                  actions.append(action)
          save_dataclass_objs_to_headered_csv(actions, action_file)
  
          video_data_manifest_file_path = (
              tempdir / "video_data_manifest_file_path.json"
          )
          with ExitStack() as stack:
              if dataset_type == VideoDatasetType.Frame:
                  video_data_dict = get_flat_video_frames(
                      tempdir, "jpg"
                  )
              elif dataset_type == VideoDatasetType.EncodedVideo:
                  video_data_dict = get_encoded_video_infos(
                      tempdir, stack
                  )
  
              save_dataclass_objs_to_headered_csv(
                  list(video_data_dict.values()),
                  video_data_manifest_file_path,
              )
              video_ids = list(self.ACTIONS_DATAS)
              dataset = EpicKitchenDataset(
                  video_info_file_path=str(video_info_file),
                  actions_file_path=str(action_file),
                  clip_sampler=lambda x, y: [
                      VideoClipInfo(
                          video_ids[i // 2], i * 2.0, i * 2.0 + 0.9
                      )
                      for i in range(0, 7)
                  ],
                  video_data_manifest_file_path=str(
                      video_data_manifest_file_path
                  ),
                  dataset_type=dataset_type,
              )
  
              get_clip_string = (
                  "pytorchvideo.data.frame_video.FrameVideo.get_clip"
                  if dataset_type == VideoDatasetType.Frame
                  else "pytorchvideo.data.encoded_video.EncodedVideo.get_clip"
              )
              with unittest.mock.patch(
                  get_clip_string,
                  return_value=(
                      {"video": torch.rand(3, 5, 10, 20), "audio": []}
                  ),
              ) as _:
                  clip_1 = dataset.__getitem__(1)
                  for i, a in enumerate(clip_1["actions"]):
                      self.assertEqual(
                          a, self.ACTIONS_DATAS[video_ids[0]][i]
                      )
                  self.assertEqual(clip_1["start_time"], 2.0)
                  self.assertEqual(clip_1["stop_time"], 2.9)
                  self.assertEqual(
                      clip_1["video_id"], MOCK_VIDEO_IDS[0]
                  )
  
                  clip_2 = dataset.__getitem__(2)
                  for i, a in enumerate(clip_2["actions"]):
                      self.assertEqual(
                          a, self.ACTIONS_DATAS[video_ids[1]][i]
                      )
                  self.assertEqual(clip_2["start_time"], 4.0)
                  self.assertEqual(clip_2["stop_time"], 4.9)
                  self.assertEqual(
                      clip_2["video_id"], MOCK_VIDEO_IDS[1]
                  )
  
file_path: pytorchvideo/tests/test_data_epic_kitchen_dataset.py
imports: import tempfile
  import unittest
  import unittest.mock
  from contextlib import ExitStack
  from pathlib import Path
  import torch
  from parameterized import parameterized
  from pytorchvideo.data.dataset_manifest_utils import VideoClipInfo, VideoDatasetType
  from pytorchvideo.data.epic_kitchen import ActionData, EpicKitchenDataset
  from pytorchvideo.data.utils import save_dataclass_objs_to_headered_csv
  from utils import get_encoded_video_infos, get_flat_video_frames, MOCK_VIDEO_IDS, MOCK_VIDEO_INFOS
label_desc: Use image node_id 3 for calling the TestEpicKitchenDataset obj's underlying member method code with example usage: obj.test__getitem__(dataset_type) without return types