public static boolean isExternalModule(GModule module, ApplicationLayout layout) {
		File moduleRootDir = module.getModuleRoot().getFile(false);
		return !layout.getApplicationRootDirs()
				.stream()
				.map(dir -> dir.getParentFile().getFile(false))
				.anyMatch(dir -> FileUtilities.isPathContainedWithin(dir, moduleRootDir));
	}
Checks to see if the given {@link GModule module} is external to the Ghidra installation
directory

@param module the module to check
@param layout Ghidra's layout
@return true if the given {@link GModule module} is external to the Ghidra installation
  directory
Ghidra/Framework/Utility/src/main/java/utility/module/ModuleUtilities.java