Yeah, the standard Pythonic way to do this I think would be to yield in a for loop, then close, kind of like what is done in the following tiny example

```Python
with open(...) as f:
    for item in f:
       yield item
```

That way we actually can call `f.close()` at the end and the coroutine system in Python will handling moving control back and forth.   The issue here is that the `_get_py` function also sometimes wants to return concrete values, so we can't use yield.  We could build small functions internally and then return them...

I'd like to pass over this for now and raise an issue.  I believe that this issue will be easily identifiable when it comes up.