private static Predicate<Node> makePredicate(Set<ApplicationId> applications) {
        Objects.requireNonNull(applications, "Applications set cannot be null, use an empty set");
        if (applications.isEmpty()) return node -> true;
        return node -> node.allocation().isPresent() && applications.contains(node.allocation().get().owner());
    }
Creates a node filter which filters using the given host filter
node-repository/src/main/java/com/yahoo/vespa/hosted/provision/node/filter/ApplicationFilter.java