public Namespace getClassNamespace(DataType dataType) throws CancelledException {

		if (dataType == null) {
			throw new IllegalArgumentException("DataType argument is null");
		}

		CategoryPath categoryPath = dataType.getCategoryPath();

		String path = categoryPath.getPath();

		if (!path.startsWith(DTM_CLASS_DATA_FOLDER_PATH)) {
			return null;
		}

		// strip off the leading class folder path and replace /'s with ::'s to get
		// class namespace path
		path = path.substring(DTM_CLASS_DATA_FOLDER_PATH.length());
		// TODO: update with regex to exclude very unlikely \/ case
		path = path.replace("/", "::");

		List<Namespace> namespaceByPath = NamespaceUtils.getNamespaceByPath(program, null, path);

		// ignore namespaces contained within libraries
		for (Namespace namespace : namespaceByPath) {
			if (!namespace.isExternal()) {
				return namespace;
			}
		}

		Msg.debug(this, "Expected clas namespace not found: " + path);
		return null;
	}
Method to get the class Namespace corresponding to the given data type. NOTE: The data type
must be in the DTM_CLASS_DATA_FOLDER_NAME folder in the data type manager.
@param dataType the given data type
@return the class Namespace corresponding to the given data type or null if the data type
is not in the DTM_CLASS_DATA_FOLDER_NAME folder or if class doesn't exist
@throws CancelledException if cancelled
Ghidra/Features/Decompiler/ghidra_scripts/classrecovery/RecoveredClassHelper.java