def __init__(self, *args, **kwargs): """ Initialize a document and decorate the appropriate methods with the retry_decorator. """ super(AutoRetryDocument, self).__init__(*args, **kwargs) UnsafeRetry.decorate_instance(instance=self, full_name=type(self))