code: def add_application_args(parser):
      """
      Common keywords for all applications
  
      :param parser:
      :return:
      """
      parser.add_argument(
          "--cuda_devices",
          metavar="",
          help="Set CUDA_VISIBLE_DEVICES variable, e.g. '0,1,2,3'; "
          "leave blank to use the system default value",
          type=str,
          default="",
      )
  
      parser.add_argument(
          "--num_threads",
          help="Set number of preprocessing threads",
          metavar="",
          type=int,
          default=2,
      )
  
      parser.add_argument(
          "--num_gpus",
          help="Set number of training GPUs",
          metavar="",
          type=int,
          default=1,
      )
  
      parser.add_argument(
          "--model_dir",
          metavar="",
          help="Directory to save/load intermediate training models and logs",
          default=DEFAULT_MODEL_DIR,
      )
  
      parser.add_argument(
          "--dataset_split_file",
          metavar="",
          help="File assigning subjects to training/validation/inference subsets",
          default=DEFAULT_DATASET_SPLIT_FILE,
      )
  
      parser.add_argument(
          "--event_handler",
          metavar="",
          help="String(s) representing event handler module(s)",
          type=str_array,
          default=DEFAULT_EVENT_HANDLERS,
      )
  
      parser.add_argument(
          "--iteration_generator",
          metavar="",
          help="String representing an iteration generator class",
          type=str,
          default=DEFAULT_ITERATION_GENERATOR,
      )
  
      return parser
  
file_path: NiftyNet/niftynet/utilities/user_parameters_default.py
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import os
  from niftynet.engine.image_window_dataset import SMALLER_FINAL_BATCH_MODE
  from niftynet.io.image_loader import SUPPORTED_LOADERS
  from niftynet.io.image_sets_partitioner import SUPPORTED_PHASES
  from niftynet.utilities.user_parameters_helper import float_array, int_array, spatial_atleast3d, spatialnumarray, str2boolean, str_array
  from niftynet.utilities.util_import import require_module
label_desc: Use image node_id 1 for calling a global function with example usage: add_application_args(parser) and returns: parser