public Map<String, Integer> computeSubscribedTopicNames(
        Set<? extends ModernGroupMember> removedMembers
    ) {
        Map<String, Integer> subscribedTopicNames = new HashMap<>(this.subscribedTopicNames);
        if (removedMembers != null) {
            removedMembers.forEach(removedMember ->
                maybeUpdateSubscribedTopicNames(
                    subscribedTopicNames,
                    removedMember,
                    null
                )
            );
        }
        return subscribedTopicNames;
    }
Updates the subscription count with a set of members removed.

@param removedMembers        The set of removed members.

@return Copy of the map of topics to the count of number of subscribers.
group-coordinator/src/main/java/org/apache/kafka/coordinator/group/modern/ModernGroup.java