code: def getArguments(parser):
      "Provides additional validation of the arguments collected by argparse."
      args = parser.parse_args()
      # check output image exists if override not forced
      if not args.force:
          if os.path.exists(args.output + args.image[-4:]):
              raise ArgumentError(
                  "The supplied output file {} already exists. Run -f/force flag to override.".format(
                      args.output
                  )
              )
  
      return args
  
file_path: medpy/bin/medpy_extract_sub_volume_by_example.py
imports: from argparse import RawTextHelpFormatter
  import argparse
  import logging
  import sys
  import os
  import numpy
  from medpy.core import ArgumentError, Logger
  from medpy.io import load, save
label_desc: Use image node_id 2 for calling a global function with example usage: getArguments(parser) and returns: args