same _init and _end functions are called in python and fortran