static DataType findDataType(DataTypeManager dataTypeManager, Demangled namespace,
			String dtName) {

		List<DataType> list = new ArrayList<>();
		dataTypeManager.findDataTypes(dtName, list);
		if (list.isEmpty()) {
			return null;
		}

		// use the datatype that exists in the root category, otherwise just pick the first one
		DataType anyDt = null;
		DataType preferredDataType = null;
		for (DataType existingDT : list) {
			if (existingDT instanceof BuiltIn) {
				// not sure if this is good - built-ins handled explicitly by getDataType()
				continue;
			}
			if (namespace == null) {
				if (existingDT.getCategoryPath().equals(CategoryPath.ROOT)) {
					return existingDT;
				}
				anyDt = existingDT;
			}
			if (isNamespaceCategoryMatch(existingDT, namespace)) {
				preferredDataType = existingDT;
			}
		}
		if (preferredDataType != null) {
			return preferredDataType;
		}
		return anyDt;
	}
Find non-builtin type
@param dataTypeManager data type manager to be searched
@param dtName name of data type
@param namespace namespace associated with dtName or null if not applicable.  If specified,
a namespace-base category path will be given precedence.
@return data type if found, otherwise null.
@see DataTypeUtilities#findDataType(DataTypeManager, ghidra.program.model.symbol.Namespace, String, Class) for similar namespace
based search.
Ghidra/Features/Base/src/main/java/ghidra/app/util/demangler/DemangledDataType.java