public boolean inheritsFrom(String ancestorId, GThemeValueMap values) {
		if (referenceId == null) {
			return false;
		}
		if (referenceId.equals(ancestorId)) {
			return true;
		}

		Set<String> visitedKeys = new HashSet<>();
		visitedKeys.add(id);
		ThemeValue<T> parent = getReferredValue(values, referenceId);

		// loop resolving indirect references
		while (parent != null) {
			if (parent.referenceId == null) {
				return false;
			}
			if (parent.referenceId.equals(ancestorId)) {
				return true;
			}
			visitedKeys.add(parent.id);
			if (visitedKeys.contains(parent.referenceId)) {
				return false;
			}
			parent = getReferredValue(values, parent.referenceId);
		}
		return false;
	}
Returns true if this ThemeValue derives its value from the given ancestorId.
@param ancestorId the id to test if this Theme value inherits from
@param values the set of values used to resolve indirect references to attempt to trace
back to the given ancestor id
@return true if this ThemeValue derives its value from the given ancestorId.
Ghidra/Framework/Gui/src/main/java/generic/theme/ThemeValue.java