code: def handle_args(args):
    
    parser = argparse.ArgumentParser()
    parser.add_argument("configpath", default=None, nargs="?",
                        help="/path/to/configs (always a directory; if omitted, all /configs are checked")
    parser.add_argument("--verbose", action="store_true", default=False)
    parsed_args = vars(parser.parse_args(args))
    # If a config path wasn't given, calculate it based on location of the script
    if parsed_args["configpath"] is None:
      script_dir = os.path.abspath(os.path.dirname(sys.argv[0]))
      parsed_args["configpath"] = os.path.normpath("{}/{}".format(script_dir, CONFIGS_RELATIVE_PATH_FROM_SCRIPT_DIR))
    else:
      parsed_args["configpath"] = os.path.normpath(parsed_args["configpath"])
    # If the path is a directory, all good. if it's a file, find the directory the file is in and check that instead
    if os.path.isdir(parsed_args["configpath"]):
      parsed_args["configdir"] = parsed_args["configpath"]
    else:
      parsed_args["configdir"] = os.path.dirname(parsed_args["configpath"])
    return parsed_args
docs: Handle command line arguments
    Raises:
      Exception if the config path wasn't explicitly state and dead reckoning based on script location fails