I have the following simplified code:
async def asynchronous_function(*args, **kwds):
    statement = await prepare(query)
    async with conn.transaction():
        async for record in statement.cursor():
            ??? yield record ???
...
class Foo:
    def __iter__(self):
        records = ??? asynchronous_function ???
        yield from records
...
x = Foo()
for record in x:
    ...
I don't know how to fill in the ??? above.  I want to yield the record data, but it's really not obvious how to wrap asyncio code.
 
     
    