public static GroupingOperation fromString(String str) {
        List<GroupingOperation> lst = fromStringAsList(str);
        if (lst.size() != 1) {
            throw new IllegalArgumentException("Expected 1 operation, got " + lst.size() + ".");
        }
        return lst.get(0);
    }
Convenience method to call {@link #fromStringAsList(String)} and assert that the list contains exactly one
grouping operation.

@param str the string to parse
@return a grouping operation that corresponds to the string
@throws IllegalArgumentException thrown if the string could not be parsed as a single operation
container-search/src/main/java/com/yahoo/search/grouping/request/GroupingOperation.java