private Boolean hasExpiredRequest(long now, Deque<NetworkClient.InFlightRequest> deque) {
        for (NetworkClient.InFlightRequest request : deque) {
            // We exclude throttle time here because we want to ensure that we don't expire requests while
            // they are throttled. The request timeout should take effect only after the throttle time has elapsed.
            if (request.timeElapsedSinceSendMs(now) - request.throttleTimeMs() > request.requestTimeoutMs)
                return true;
        }
        return false;
    }
Clear out all the in-flight requests for the given node and return them

@param node The node
@return All the in-flight requests for that node that have been removed
clients/src/main/java/org/apache/kafka/clients/InFlightRequests.java