public @Nullable Set<Node> apply(Set<Node> nodes, HolderType holderType) {
        Set<Node> results = new HashSet<>();
        boolean change = false;

        for (Node node : nodes) {
            Node result = apply(node);
            if (result != node) {
                change = true;
            }
            if (result != null) {
                results.add(result);
            }
        }

        if (!change) {
            return null;
        }

        if (this.trackStatistics) {
            this.statistics.incrementAffected(holderType);
        }

        return results;
    }
Applies this query to the given set of nodes, and returns the result.

@param nodes the input nodes
@param holderType the holder type the nodes are from
@return the transformed nodes, or null if no change was made
common/src/main/java/me/lucko/luckperms/common/bulkupdate/BulkUpdate.java