static <T extends ModernGroupMember> MemberSubscriptionAndAssignmentImpl createMemberSubscriptionAndAssignment(
        T member,
        Assignment memberAssignment,
        TopicsImage topicsImage
    ) {
        return new MemberSubscriptionAndAssignmentImpl(
            Optional.ofNullable(member.rackId()),
            Optional.ofNullable(member.instanceId()),
            new TopicIds(member.subscribedTopicNames(), topicsImage),
            memberAssignment
        );
    }
Builds the new target assignment.

@return A TargetAssignmentResult which contains the records to update
        the existing target assignment.
@throws PartitionAssignorException if the target assignment cannot be computed.
group-coordinator/src/main/java/org/apache/kafka/coordinator/group/modern/TargetAssignmentBuilder.java