public void removeMember(String memberId) {
        ShareGroupMember oldMember = members.remove(memberId);
        maybeUpdateSubscribedTopicNamesAndGroupSubscriptionType(oldMember, null);
        maybeRemovePartitionEpoch(oldMember);
        maybeUpdateGroupState();
    }
Remove the member from the group.

@param memberId The member id to remove.
group-coordinator/src/main/java/org/apache/kafka/coordinator/group/modern/share/ShareGroup.java