class_docstr: Action recognition video data set for EpicKitchen-55 Dataset.
  <https://epic-kitchens.github.io/2019/>
  
  This dataset handles the loading, decoding, and clip sampling for the videos.
docstr: Args:
      seconds_per_clip (float): The length of each sampled clip in seconds.
      clip_sampling (ClipSampling):
          The type of sampling to perform to perform on the videos of the dataset.
  
  Returns:
      A function that takes a dictionary of videos and a dictionary of the actions
      for each video and outputs a list of sampled clips.
docstr_tok: ["Args",":","seconds_per_clip","(","float",")",":","The","length","of","each","sampled","clip","in","seconds",".","clip_sampling","(","ClipSampling",")",":","The","type","of","sampling","to","perform","to","perform","on","the","videos","of","the","dataset",".","Returns",":","A","function","that","takes","a","dictionary","of","videos","and","a","dictionary","of","the","actions","for","each","video","and","outputs","a","list","of","sampled","clips","."]
code: def _define_clip_structure_generator(
      seconds_per_clip: float, clip_sampling: ClipSampling
  ) -> Callable[
      [Dict[str, Video], Dict[str, List[ActionData]]],
      List[VideoClipInfo],
  ]:
      """
      Args:
          seconds_per_clip (float): The length of each sampled clip in seconds.
          clip_sampling (ClipSampling):
              The type of sampling to perform to perform on the videos of the dataset.
  
      Returns:
          A function that takes a dictionary of videos and a dictionary of the actions
          for each video and outputs a list of sampled clips.
      """
      if not clip_sampling == ClipSampling.RandomOffsetUniform:
          raise NotImplementedError(
              f"Only {ClipSampling.RandomOffsetUniform} is implemented. "
              f"{clip_sampling} not implemented."
          )
  
      def define_clip_structure(
          videos: Dict[str, Video], actions: Dict[str, List[ActionData]]
      ) -> List[VideoClipInfo]:
          clips = []
          for video_id, video in videos.items():
              offset = random.random() * seconds_per_clip
              num_clips = int(
                  (video.duration - offset) // seconds_per_clip
              )
  
              for i in range(num_clips):
                  start_time = i * seconds_per_clip + offset
                  stop_time = start_time + seconds_per_clip
                  clip = VideoClipInfo(video_id, start_time, stop_time)
                  clips.append(clip)
          return clips
  
      return define_clip_structure
  
file_path: pytorchvideo/pytorchvideo/data/epic_kitchen_recognition.py
imports: import random
  from dataclasses import fields
  from enum import Enum
  from typing import Any, Callable, Dict, List, Optional
  import torch
  from pytorchvideo.data.dataset_manifest_utils import EncodedVideoInfo, VideoClipInfo, VideoDatasetType, VideoFrameInfo, VideoInfo
  from pytorchvideo.data.epic_kitchen import ActionData, EpicKitchenDataset
  from pytorchvideo.data.video import Video
label_desc: Use image node_id 4 for calling the EpicKitchenRecognition obj's underlying member method code with example usage: obj._define_clip_structure_generator(seconds_per_clip, clip_sampling) and returns: define_clip_structure, clips