private static <T> Set<T> fillSet(Set<T> baseSet, Set<T> fillSet, Predicate<T> predicate) {
        Set<T> result = new HashSet<>(baseSet);
        for (T element : fillSet) {
            if (predicate.test(element)) {
                result.add(element);
            }
        }
        return result;
    }
Copies {@code baseSet} and adds all non-existent elements in {@code fillSet} such that {@code predicate} is true.
In other words, all elements of {@code baseSet} will be contained in the result, with additional non-overlapping
elements in {@code fillSet} where the predicate is true.

@param baseSet the base elements for the resulting set
@param fillSet elements to be filled into the resulting set
@param predicate tested against the fill set to determine whether elements should be added to the base set
clients/src/main/java/org/apache/kafka/clients/MetadataSnapshot.java