class_docstr: This LightningDataModule implementation constructs a PyTorchVideo Kinetics dataset for both
  the train and val partitions. It defines each partition's augmentation and
  preprocessing transforms and configures the PyTorch DataLoaders.
docstr: This function contains example transforms using both PyTorchVideo and TorchVision
  in the same Callable. For 'train' mode, we use augmentations (prepended with
  'Random'), for 'val' mode we use the respective determinstic function.
code: def _video_transform(self, mode: str):
      """
      This function contains example transforms using both PyTorchVideo and TorchVision
      in the same Callable. For 'train' mode, we use augmentations (prepended with
      'Random'), for 'val' mode we use the respective determinstic function.
      """
      args = self.args
      return ApplyTransformToKey(
          key="video",
          transform=Compose(
              [
                  UniformTemporalSubsample(args.video_num_subsampled),
                  Normalize(args.video_means, args.video_stds),
              ]
              + (
                  [
                      RandomShortSideScale(
                          min_size=args.video_min_short_side_scale,
                          max_size=args.video_max_short_side_scale,
                      ),
                      RandomCrop(args.video_crop_size),
                      RandomHorizontalFlip(
                          p=args.video_horizontal_flip_p
                      ),
                  ]
                  if mode == "train"
                  else [
                      ShortSideScale(args.video_min_short_side_scale),
                      CenterCrop(args.video_crop_size),
                  ]
              )
          ),
      )
  
imports: import argparse
  import itertools
  import logging
  import os
  import pytorch_lightning
  import pytorchvideo.data
  import pytorchvideo.models.resnet
  import torch
  import torch.nn.functional
  from pytorch_lightning.callbacks import LearningRateMonitor
  from pytorchvideo.transforms import ApplyTransformToKey, Normalize, RandomShortSideScale, RemoveKey, ShortSideScale, UniformTemporalSubsample
  from slurm import copy_and_run_with_config
  from torch.utils.data import DistributedSampler, RandomSampler
  from torchaudio.transforms import MelSpectrogram, Resample
  from torchvision.transforms import CenterCrop, Compose, Lambda, RandomCrop, RandomHorizontalFlip
label_desc: Use image node_id 3 for calling the KineticsDataModule obj's underlying member method code with example usage: obj._video_transform(mode) and returns: ApplyTransformToKey