public Iterable<PermissionHolder> traverse(TraversalAlgorithm algorithm, boolean postTraversalSort, PermissionHolder startNode) {
        Iterable<PermissionHolder> traversal = traverse(algorithm, startNode);

        // perform post traversal sort if needed
        if (postTraversalSort) {
            List<PermissionHolder> resolvedTraversal = new ArrayList<>();
            for (PermissionHolder node : traversal) {
                resolvedTraversal.add(node);
            }

            resolvedTraversal.sort(startNode.getInheritanceComparator());
            traversal = resolvedTraversal;
        }

        return traversal;
    }
Returns an iterable which will traverse this inheritance graph using the specified
algorithm starting at the given permission holder start node.

@param algorithm the algorithm to use when traversing
@param postTraversalSort if a final sort according to inheritance (weight, primary group) rules
                         should be performed after the traversal algorithm has completed
@param startNode the start node in the inheritance graph
@return an iterable
common/src/main/java/me/lucko/luckperms/common/inheritance/InheritanceGraph.java