private static void addPartitionToAssignment(
        Map<String, MemberAssignment> memberAssignments,
        String memberId,
        Uuid topicId,
        int partition
    ) {
        memberAssignments.get(memberId)
            .partitions()
            .computeIfAbsent(topicId, __ -> new HashSet<>())
            .add(partition);
    }
Adds the topic's partition to the member's target assignment.
group-coordinator/src/main/java/org/apache/kafka/coordinator/group/assignor/UniformHeterogeneousAssignmentBuilder.java