public KeyPath parent(int n) {
		if (n < 0) {
			throw new IllegalArgumentException("n<0");
		}
		if (keys.length < n) {
			return null;
		}
		return new KeyPath(Arrays.copyOf(keys, keys.length - n));
	}
Create a new path by removing the final {@code n} keys

@param n the number of keys to remove
@return the resulting path, or null if fewer than 0 keys would remain
Ghidra/Debug/Framework-TraceModeling/src/main/java/ghidra/trace/model/target/path/KeyPath.java