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 argf 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
docs: Provides additional validation of the arguments collected by argparse.