public boolean supportsProtocols(String memberProtocolType, Set<String> memberProtocols) {
        if (isInState(EMPTY)) {
            return !memberProtocolType.isEmpty() && !memberProtocols.isEmpty();
        } else {
            return protocolType.map(type -> type.equals(memberProtocolType)).orElse(false) &&
                memberProtocols.stream()
                    .anyMatch(name -> supportedProtocols.getOrDefault(name, 0) == members.size());
        }
    }
Checks whether at least one of the given protocols can be supported. A
protocol can be supported if it is supported by all members.

@param memberProtocolType  the member protocol type.
@param memberProtocols     the set of protocol names.

@return a boolean based on the condition mentioned above.
group-coordinator/src/main/java/org/apache/kafka/coordinator/group/classic/ClassicGroup.java