private List<PackageElement> getScriptPackages() {
		Set<PackageElement> packages = new HashSet<>();
		for (TypeElement type : api.getImportedTypes()) {
			packages.add(PythonTypeStubElement.getPackage(type));
		}
		for (TypeElement type : script.getImportedTypes()) {
			packages.add(PythonTypeStubElement.getPackage(type));
		}
		List<PackageElement> res = new ArrayList<>(packages);
		res.sort(PythonTypeStubElement::compareQualifiedNameable);
		return res;
	}
Gets a list of all imported packages

@return the list of packages
GhidraBuild/BuildFiles/Doclets/src/main/java/ghidra/doclets/typestubs/GhidraBuiltinsBuilder.java