Python decorator for retrying a function N times | Hacker News Reader