def before_external_call(): # this function must not raise, in such a way that the exception # transformer knows that it cannot raise! rgil.gil_release()