Support XAD's external functions in Python. Similarly to checkpointing, it requires Python function callbacks to be called from C++.