Interface the fortran routines that calculate the integral kernels to a Python module. Make sure to handle the input of the routines correctly, including background calculation.
The idea is to do the heavy computational lifting in Fortran, while Python does the high level flow structure. This may require restructuring in KIM. But, the Fortran code should be still usable in standalone mode.