code: def parser_to_opts(
      parser: argparse.ArgumentParser, args: Optional[List[str]] = None
  ):
      # parse args
      opts = parser.parse_args(args)
      opts = load_config_file(opts)
      return opts
  
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 3 for calling a global function with example usage: parser_to_opts(parser, args) and returns: opts