How to handle on_failure statements when building AST loops in pytest assertion rewriter?