Not just CPU: writing custom profilers for Python