public void relationshipFilter(Predicate<Relationship> predicate) {
        this.filter = predicate;
    }
Sets a predicate function to prevents traversing specific relationships.

@param predicate Predicate that must return true in order to continue traversing relationships.
smithy-model/src/main/java/software/amazon/smithy/model/selector/PathFinder.java