Shortcut to assign stop_max_attempt_number

Make some changes so we can use `@retry(3)` or `@retry(stop_max_attempt_number=3)`.