default int computeFrameLevel(KeyPath path) {
		KeyPath framePath = searchForAncestor(TraceObjectStackFrame.class, path);
		if (framePath == null) {
			return 0;
		}
		KeyPath stackPath = searchForAncestor(TraceObjectStack.class, framePath);
		for (int i = stackPath == null ? 0 : stackPath.size(); i < framePath.size(); i++) {
			String key = framePath.key(i);
			if (KeyPath.isIndex(key)) {
				return Integer.decode(KeyPath.parseIndex(key));
			}
		}
		throw new IllegalArgumentException("No index between stack and frame");
	}
Compute the frame level of the object at the given path relative to this schema

<p>
If there is no {@link TraceObjectStackFrame} in the path, this will return 0 since it is not
applicable to the object. If there is a stack frame in the path, this will examine its
ancestry, up to and excluding the {@link TraceObjectStack} for an index. If there isn't a
stack in the path, it is assumed to be an ancestor of this schema, meaning the examination
will exhaust the ancestry provided in the path. If no index is found, an exception is thrown,
because the frame level is applicable, but couldn't be computed from the path given. In that
case, the client should include more ancestry in the path. Ideally, this is invoked relative
to the root schema.

@param path the path
@return the frame level, or 0 if not applicable
@throws IllegalArgumentException if frame level is applicable but not given in the path
Ghidra/Debug/Framework-TraceModeling/src/main/java/ghidra/trace/model/target/schema/TraceObjectSchema.java