code: def parse_arguments(args=None):
      parser = build_arg_parser()
      args, dynamic_args = parser.parse_known_args(args)
  
      dynamic_args = parse_dynamic_args(dynamic_args)
  
      unknown_args = list(
          [
              arg
              for arg in dynamic_args
              if not any(
                  [
                      arg.startswith(prefix.value)
                      for prefix in MtlArgsPrefix
                  ]
              )
          ]
      )
      if len(unknown_args) > 0:
          raise ValueError(f"Unrecognized arguments: {unknown_args}")
  
      new_args = AttrDict({**args.__dict__, **dynamic_args})
  
      # Parsing str args that contains lists of ints
      for a in INT_LIST_ARGS:
          new_args[a] = parse_list_arg(new_args[a], vtype=int)
  
      for a in STR_LIST_ARGS:
          new_args[a] = parse_list_arg(new_args[a])
  
      # logging.info(f"ARGUMENTS: {new_args}")
  
      return new_args
  
file_path: Merlin/examples/quick_start/scripts/ranking/args_parsing.py
imports: import argparse
  from enum import Enum
label_desc: Use image node_id 4 for calling a global function with example usage: parse_arguments(args) and returns: new_args