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:
      transform (Callable[[Dict[str, Any]], Dict[str, Any]]): A function that performs
      any operation on a clip before it is returned in the default transform function.
  
  Returns:
      A function that performs any operation on a clip and returns the transformed clip.
docstr_tok: ["Args",":","transform","(","Callable","[","[","Dict","[","str",",","Any","]","]",",","Dict","[","str",",","Any","]","]",")",":","A","function","that","performs","any","operation","on","a","clip","before","it","is","returned","in","the","default","transform","function",".","Returns",":","A","function","that","performs","any","operation","on","a","clip","and","returns","the","transformed","clip","."]
code: def _transform_generator(
      transform: Callable[[Dict[str, Any]], Dict[str, Any]]
  ) -> Callable[[Dict[str, Any]], Dict[str, Any]]:
      """
      Args:
          transform (Callable[[Dict[str, Any]], Dict[str, Any]]): A function that performs
          any operation on a clip before it is returned in the default transform function.
  
      Returns:
          A function that performs any operation on a clip and returns the transformed clip.
      """
  
      def transform_clip(clip: Dict[str, Any]) -> Dict[str, Any]:
          actions_in_clip: List[ActionData] = [
              a
              for a in clip["actions"]
              if (
                  a.start_time <= clip["stop_time"]
                  and a.stop_time >= clip["start_time"]
              )
          ]
          clip["actions"] = actions_in_clip
  
          for key in clip:
              if clip[key] is None:
                  clip[key] = torch.tensor([])
  
          if transform:
              clip = transform(clip)
  
          return clip
  
      return transform_clip
  
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 2 for calling the EpicKitchenRecognition obj's underlying member method code with example usage: obj._transform_generator(transform) and returns: transform_clip, clip