Imports in both languages are done with standard import statements.
Java code imported into Python is subjected to reflection and then Python wrapper classes are generated using the Python API that provide runtime translations between the two language runtimes. A native Python module is provided that provides the "magic import" functionality from Java to Python (https://qoretechnologies.com/manual/qorus/current/python/html/index.html#python_qoreloader_import_java).
Python code imported into Java is introspected using the Python C API and then bytecode is generated for Java wrapper classes that provide a similar runtime translation as the imports in the other direction. A custom compiler based on javax.tools (https://docs.oracle.com/en/java/javase/11/docs/api/java.compiler/javax/tools/package-summary.html) is provided (https://qoretechnologies.com/manual/qorus//gitlab-docs/develop/jni/html/classorg_1_1qore_1_1jni_1_1compiler_1_1QoreJavaCompiler.html) as well as runtime dynamic code generation support for wrapper APIs in a custom class loader (https://qoretechnologies.com/manual/qorus//gitlab-docs/develop/jni/html/classorg_1_1qore_1_1jni_1_1QoreURLClassLoader.html - more info here: https://qoretechnologies.com/manual/qorus//gitlab-docs/develop/jni/html/index.html).
The idea is to facilitate the mixed use of enterprise technologies (Java) and AI / data science technologies (Python).
All of the source code required has been released under permissive open source licenses (MIT).
I hope it could be interesting and useful for someone - happy to provide more information if there's interest.