Utilities to retry Python callables