public static Assignment fromRecord(
        ConsumerGroupTargetAssignmentMemberValue record
    ) {
        return new Assignment(
            record.topicPartitions().stream().collect(Collectors.toMap(
                ConsumerGroupTargetAssignmentMemberValue.TopicPartition::topicId,
                topicPartitions -> new HashSet<>(topicPartitions.partitions())))
        );
    }
Creates a {{@link Assignment}} from a {{@link ConsumerGroupTargetAssignmentMemberValue}}.

@param record The record.
@return A {{@link Assignment}}.
group-coordinator/src/main/java/org/apache/kafka/coordinator/group/modern/Assignment.java