public static <K, V> Map<K, V> subtractMap(Map<? extends K, ? extends V> minuend, Map<? extends K, ? extends V> subtrahend) {
        return minuend.entrySet().stream()
                .filter(entry -> !subtrahend.containsKey(entry.getKey()))
                .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue));
    }
Given two maps (A, B), returns all the key-value pairs in A whose keys are not contained in B
clients/src/main/java/org/apache/kafka/common/utils/CollectionUtils.java