Working towards refactoring goal: C-code of Python API shall also directly call JNI