public void resolveLevel(int level) {
        if (level < 0) {
            throw new IllegalArgumentException("Expression '" + this + "' recurses through a single hit.");
        }
        this.level = level;
    }
Resolves the conceptual level of this expression. This level represents the type of data that is consumed by this
expression, where level 0 is a single hit, level 1 is a group, level 2 is a list of groups, and so forth. This
method verifies the input level against the expression type, and recursively resolves the level of all argument
expressions.

@param level The level of the input data.
@throws IllegalArgumentException Thrown if the level of this expression could not be resolved.
@throws IllegalStateException    Thrown if type failed to accept the number of arguments provided.
container-search/src/main/java/com/yahoo/search/grouping/request/GroupingExpression.java