@@ -0,0 +1,344 @@
+def retry(func):%0A    max_retries = 10%0A%0A    def wrapper(*args, **kwargs):%0A        for i in range(max_retries, 0, -1):%0A            try:%0A                print('RETRY', i)%0A                return func(*args, **kwargs)%0A            except (Exception,)%5B:i - 1%5D:%0A                pass%0A%0A    return wrapper%0A%0A%0A@retry%0Adef foo():%0A    raise ValueError%0A%0A%0Afoo()%0A

Create retry.py