static String sanitize(TypeMirror type, PackageElement pkg) {
		return switch (type.getKind()) {
			case DECLARED -> throw new RuntimeException(
				"declared types should use the qualified name");
			case ARRAY -> {
				TypeMirror component = ((ArrayType) type).getComponentType();
				yield "jpype.JArray[" + sanitizeQualifiedName(component, pkg) + "]";
			}
			case BOOLEAN -> "jpype.JBoolean";
			case BYTE -> "jpype.JByte";
			case CHAR -> "jpype.JChar";
			case DOUBLE -> "jpype.JDouble";
			case FLOAT -> "jpype.JFloat";
			case INT -> "jpype.JInt";
			case LONG -> "jpype.JLong";
			case SHORT -> "jpype.JShort";
			case TYPEVAR -> type.toString();
			case WILDCARD -> getWildcardVarName((WildcardType) type, pkg);
			default -> throw new RuntimeException("unexpected TypeKind " + type.getKind());
		};
	}
Makes the provided type Python safe if necessary

@param type the type to make Python safe
@param pkg the current package
@return the Python safe type name
GhidraBuild/BuildFiles/Doclets/src/main/java/ghidra/doclets/typestubs/PythonTypeStubElement.java