How to determine CPU and memory cost of a function in Python? | Hacker News Reader