def parse_args():
    parser = ArgumentParser(
        description="Post sample query results to the result dashboard")
    parser.add_argument('--query-ids', '-q', nargs="+", metavar="QUERY_ID",
                        help=('Query ids to create new results for. Defaults '
                              'to a single random query id'))
    parser.add_argument('--num-groups', '-g', nargs="+", type=int,
                        metavar="NUM_GROUPS",
                        help=('The number of groups for each query id '
                              'specified by -q. If 1, the query will be '
                              'ungrouped. Defaults to 1 each query.'))
    args = parser.parse_args()

    if not args.query_ids:
        args.query_ids = [str(uuid.uuid4())]

    if not args.num_groups:
        args.num_groups = [1 for _ in args.query_ids]

    for num_group in args.num_groups:
        if 1 < num_group:
            raise ValueError("A query can't have less than 1 group!")

    if len(args.num_groups) != len(args.query_ids):
        print ("Length of --num-groups option must match the length of the "
               "--query-ids option!")
        print ""
        parser.print_usage()
        sys.exit()

    args.query_id_map = {
        args.query_ids[i]: args.num_groups[i] for i in range(len(args.query_ids))
    }
    return args
dataset/ETHPy150Open amplab/ampcrowd/ampcrowd/results_dashboard/post.py/parse_args/swapped operands of `<`