private String topicIdPartitionsToLogString(Collection<TopicIdPartition> partitions) {
        if (!log.isTraceEnabled()) {
            return String.format("%d partition(s)", partitions.size());
        }
        return "(" + partitions.stream().map(TopicIdPartition::toString).collect(Collectors.joining(", ")) + ")";
    }
A builder that allows for presizing the PartitionData hashmap, and avoiding making a
 secondary copy of the sessionPartitions, in cases where this is not necessarily.
 This builder is primarily for use by the Replica Fetcher
@param size the initial size of the PartitionData hashmap
@param copySessionPartitions boolean denoting whether the builder should make a deep copy of
                             session partitions
clients/src/main/java/org/apache/kafka/clients/FetchSessionHandler.java