Python bindings generate code for callbacks.