public boolean isEmpty(String node) {
        Deque<NetworkClient.InFlightRequest> queue = requests.get(node);
        return queue == null || queue.isEmpty();
    }
Return true if there is no in-flight request directed at the given node and false otherwise
clients/src/main/java/org/apache/kafka/clients/InFlightRequests.java