private static String partitionsToLogString(Collection<TopicIdPartition> partitions) {
        return FetchSession.partitionsToLogString(partitions, log.isTraceEnabled());
    }
The cachedTopicIdPartitionsInShareSession method is used to get the cached topic-partitions in the share session.

@param groupId The group id in the share fetch request.
@param memberId The member id in the share fetch request.

@return The list of cached topic-partitions in the share session if present, otherwise an empty list.
core/src/main/java/kafka/server/share/SharePartitionManager.java