Ask HN: Best Way to Refactor This Python Method? | Hacker News Reader