class_docstr: Base AudioVideo Reader
  
  Args:
      opts: command line arguments
      is_training: Training or validation mode. Default: `False`.
class_docstr_tok: ["Base","AudioVideo","Reader","Args",":","opts",":","command","line","arguments","is_training",":","Training","or","validation","mode",".","Default",":","`","False","`","."]
code: def get_frame_transform(
      opts: argparse.Namespace, is_training: bool, *args, **kwargs
  ) -> BaseTransformation:
      if is_training:
          auto_augment = getattr(
              opts,
              "frame_augmentation.auto_augment.enable",
          )
          rand_augment = getattr(
              opts,
              "frame_augmentation.rand_augment.enable",
          )
          random_erase = getattr(
              opts,
              "frame_augmentation.random_erase.enable",
          )
      # We want to be able to re-use the "image" augmentations on the video frames.
      # As the use of "--image-augmentation.*" argparse prefix for video datasets can
      # be confusing, we use "--frame-augmentation.*" prefix.
      frame_opts = extract_opts_with_prefix_replacement(
          opts,
          match_prefix="frame_augmentation.",
          replacement_prefix="image_augmentation.",
      )
      if is_training:
          aug_list = []
          if auto_augment and rand_augment:
              logger.error(
                  "AutoAugment and RandAugment are mutually exclusive. Use either of"
                  " them, but not both."
              )
          elif auto_augment:
              aug_list.append(T.AutoAugment(opts=frame_opts))
          elif rand_augment:
              aug_list.append(T.RandAugment(opts=frame_opts))
  
          aug_list.append(T.ToTensor(opts=frame_opts))
  
          if random_erase:
              aug_list.append(T.RandomErasing(opts=frame_opts))
  
          return Compose(opts=frame_opts, img_transforms=aug_list)
      else:
          return T.ToTensor(opts=frame_opts)
  
imports: import argparse
  import random
  from typing import Dict, Optional, Tuple
  import av
  import numpy
  import torch
  import torch.nn.functional
  from torch import Tensor
  from data.transforms import BaseTransformation
  from data.transforms import image_pil
  from data.transforms.common import Compose
  from options.utils import extend_selected_args_with_prefix, extract_opts_with_prefix_replacement
  from utils import logger
label_desc: Use image node_id 3 for calling the BaseAVReader obj's underlying member method code with example usage: obj.get_frame_transform(opts, is_training) and returns: Compose, T