code: def get_training_arguments(
      parse_args: Optional[bool] = True,
      args: Optional[List[str]] = None,
  ):
      parser = argparse.ArgumentParser(
          description="Training arguments", add_help=True
      )
  
      # dataset related arguments
      parser = arguments_dataset(parser=parser)
  
      # cvnet arguments, including models
      parser = modeling_arguments(parser=parser)
  
      # sampler related arguments
      parser = add_sampler_arguments(parser=parser)
  
      # collate fn  related arguments
      parser = arguments_collate_fn(parser=parser)
  
      # transform related arguments
      parser = arguments_augmentation(parser=parser)
  
      # Video reader related arguments
      # Should appear after arguments_augmentations(parser=parser) because "--frame-augmentation.*" depends on "--image-augmentation.*"
      parser = arguments_video_reader(parser=parser)
  
      # loss function arguments
      parser = add_loss_fn_arguments(parser=parser)
  
      # optimizer arguments
      parser = arguments_optimizer(parser=parser)
      parser = arguments_scheduler(parser=parser)
  
      # DDP arguments
      parser = arguments_ddp(parser=parser)
  
      # stats arguments
      parser = arguments_stats(parser=parser)
  
      # common
      parser = arguments_common(parser=parser)
  
      # text tokenizer arguments
      parser = arguments_tokenizer(parser=parser)
  
      # metric arguments
      parser = METRICS_REGISTRY.all_arguments(parser=parser)
  
      if parse_args:
          return parser_to_opts(parser, args)
      else:
          return parser
  
imports: import argparse
  from typing import List, Optional
  from common import SUPPORTED_MODALITIES
  from cvnets import modeling_arguments
  from data.collate_fns import arguments_collate_fn
  from data.datasets import arguments_dataset
  from data.sampler import add_sampler_arguments
  from data.text_tokenizer import arguments_tokenizer
  from data.transforms import arguments_augmentation
  from data.video_reader import arguments_video_reader
  from loss_fn import add_loss_fn_arguments
  from metrics import METRICS_REGISTRY, arguments_stats
  from optim import arguments_optimizer
  from optim.scheduler import arguments_scheduler
  from options.utils import load_config_file
  from utils import logger
label_desc: Use image node_id 4 for calling a global function with example usage: get_training_arguments(parse_args, args) and returns: parser_to_opts, parser