public GroupingTransform putLabel(int parentTag, int tag, String label, String type) {
        Set<Integer> siblings = children.get(parentTag);
        if (siblings == null) {
            siblings = new HashSet<>();
            children.put(parentTag, siblings);
        } else {
            for (Integer sibling : siblings) {
                if (label.equals(labels.get(sibling))) {
                    throw new IllegalInputException("Can not use " + type + " label '" + label +
                                                    "' for multiple siblings.");
                }
            }
        }
        siblings.add(tag);
        if (labels.containsKey(tag)) {
            throw new IllegalStateException("Can not set label of " + type + " " + tag + " to '" + label +
                                            "' because it is already set to '" + labels.get(tag) + "'.");
        }
        labels.put(tag, label);
        return this;
    }
This class contains enough information about how a {@link com.yahoo.search.grouping.request.GroupingOperation} was
transformed into a list {@link com.yahoo.searchlib.aggregation.Grouping} objects, so that the results of those
queries can be transformed into something that corresponds to the original request.

@author Simon Thoresen Hult
container-search/src/main/java/com/yahoo/search/grouping/vespa/GroupingTransform.java