default KeyPath searchForAncestorContainer(Class<? extends TraceObjectInterface> type,
			KeyPath path) {
		for (; path != null; path = path.parent()) {
			TraceObjectSchema schema = getSuccessorSchema(path);
			if (!schema.isCanonicalContainer()) {
				continue;
			}
			TraceObjectSchema deSchema =
				schema.getContext().getSchema(schema.getDefaultElementSchema());
			if (deSchema.getInterfaces().contains(type)) {
				return path;
			}
		}
		return null;
	}
Find the nearest ancestor which is the canonical container of the given interface

<p>
If the given path is such a container, it is returned, i.e., it is not strictly an ancestor.

@param type the interface whose canonical container to search for
@param path the seed path
@return the found path, or {@code null} if no such ancestor was found
Ghidra/Debug/Framework-TraceModeling/src/main/java/ghidra/trace/model/target/schema/TraceObjectSchema.java