private boolean maybeCompleteLeaveInProgress() {
        if (leaveGroupInProgress.isPresent()) {
            leaveGroupInProgress.get().complete(null);
            leaveGroupInProgress = Optional.empty();
            return true;
        }
        return false;
    }
Complete the leave in progress (if any). This is expected to be used to complete the leave
in progress when a member receives the response to the leave heartbeat.
clients/src/main/java/org/apache/kafka/clients/consumer/internals/MembershipManagerImpl.java