private int getMaxAssignmentSize(List<String> allSubscribedTopics) {
            int maxAssignmentSize;
            if (allSubscribedTopics.size() == partitionsPerTopic.size()) {
                maxAssignmentSize = totalPartitionsCount;
            } else {
                maxAssignmentSize = allSubscribedTopics.stream().map(partitionsPerTopic::get).map(List::size).reduce(0, Integer::sum);
            }
            return maxAssignmentSize;
        }
get the maximum assigned partition size of the {@code allSubscribedTopics}

@param allSubscribedTopics           the subscribed topics of a consumer
@return                              maximum assigned partition size
clients/src/main/java/org/apache/kafka/clients/consumer/internals/AbstractStickyAssignor.java