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 add_arguments(
      cls, parser: argparse.ArgumentParser
  ) -> argparse.ArgumentParser:
      if (
          cls != BaseAVReader
      ):  # Shouldn't run for subclasses that don't override add_arguments
          return parser
  
      group = parser.add_argument_group(title=cls.__name__)
      group.add_argument(
          "--video-reader.name",
          type=str,
          default="pyav",
          help="Name of video reader.",
      )
      group.add_argument(
          "--video-reader.fast-video-decoding",
          action="store_true",
          help="Multi-threaded fast video decoding using pyav.",
      )
      group.add_argument(
          "--video-reader.frame-stack-format",
          type=str,
          default="sequence_first",
          choices=["sequence_first", "channel_first"],
          help="Sequence first (NTCHW) or channel first (NCTHW) format for stacking"
          " video frames.",
      )
      # 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.
      parser = extend_selected_args_with_prefix(
          parser,
          match_prefix="--image-augmentation.",
          additional_prefix="--frame-augmentation.",
      )
      return parser
  
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 1 for calling the BaseAVReader obj's underlying member method code with example usage: obj.add_arguments(cls, parser) and returns: parser, parser