public short defaultValue(MetadataVersion metadataVersion) {
        short level = 0;
        for (Iterator<FeatureVersion> it = Arrays.stream(featureVersions).iterator(); it.hasNext(); ) {
            FeatureVersion feature = it.next();
            if (feature.bootstrapMetadataVersion().isLessThan(metadataVersion) || feature.bootstrapMetadataVersion().equals(metadataVersion))
                level = feature.featureLevel();
            else
                return level;
        }
        return level;
    }
A method to return the default (latest production) level of a feature based on the metadata version provided.

Every time a new feature is added, it should create a mapping from metadata version to feature version
with {@link FeatureVersion#bootstrapMetadataVersion()}. When the feature version is production ready, the metadata
version should be made production ready as well.

@param metadataVersion the metadata version we want to use to set the default.
@return the default version level given the feature and provided metadata version
server-common/src/main/java/org/apache/kafka/server/common/Features.java