async def asyncgen_to_list(generator: AsyncGenerator[_T, Any]) -> list[_T]:
    """Convert an async generator to a list."""
    return [element async for element in generator]
Convert an async generator to a list.
strawberry/utils/aio.py