code: def is_valid_folder(parser, arg):
      
      arg = os.path.abspath(arg)
      if not os.path.isdir(arg):
          parser.error("The folder %s does not exist!" % arg)
      else:
          return arg
docs: Check if arg is a valid file that already exists on the file system.