public Stream<KeyPath> streamMatchingAncestry(PathFilter filter) {
		if (!filter.ancestorMatches(this, false)) {
			return Stream.of();
		}
		Stream<KeyPath> ancestry =
			isRoot() ? Stream.of() : parent().streamMatchingAncestry(filter);
		if (filter.matches(this)) {
			return Stream.concat(Stream.of(this), ancestry);
		}
		return ancestry;
	}
Stream, starting with the longer paths, paths that match the given predicates

@param filter the predicates to filter the ancestor paths
@return the stream of matching paths, longest to shortest
Ghidra/Debug/Framework-TraceModeling/src/main/java/ghidra/trace/model/target/path/KeyPath.java