void generate(CodeBuffer buffer) {
        Versions ifVersions = possibleVersions.intersect(containingVersions);
        Versions ifNotVersions = possibleVersions.subtract(containingVersions);
        // In the case where ifNotVersions would be two ranges rather than one,
        // we just pass in the original possibleVersions instead.
        // This is slightly less optimal, but allows us to avoid dealing with
        // multiple ranges.
        if (ifNotVersions == null) {
            ifNotVersions = possibleVersions;
        }

        if (possibleVersions.lowest() < containingVersions.lowest()) {
            if (possibleVersions.highest() > containingVersions.highest()) {
                generateFullRangeCheck(ifVersions, ifNotVersions, buffer);
            } else if (possibleVersions.highest() >= containingVersions.lowest()) {
                generateLowerRangeCheck(ifVersions, ifNotVersions, buffer);
            } else {
                generateAlwaysFalseCheck(ifNotVersions, buffer);
            }
        } else if (possibleVersions.highest() >= containingVersions.lowest() &&
                    (possibleVersions.lowest() <= containingVersions.highest())) {
            if (possibleVersions.highest() > containingVersions.highest()) {
                generateUpperRangeCheck(ifVersions, ifNotVersions, buffer);
            } else {
                generateAlwaysTrueCheck(ifVersions, buffer);
            }
        } else {
            generateAlwaysFalseCheck(ifNotVersions, buffer);
        }
    }
If this is set, VersionConditional#generate will throw an exception if
the 'ifMember' clause is never used.  This is useful as a sanity check
in some cases where it doesn't make sense for the condition to always be
false.  For example, when generating a Message#write function, 
we might check that the version we're writing is supported.  It wouldn't
make sense for this check to always be false, since that would mean that
no versions at all were supported.
generator/src/main/java/org/apache/kafka/message/VersionConditional.java