async def aclosing(thing: _T) -> AsyncGenerator[_T, None]:
    """Ensure that an async generator is closed properly.

    Port from the stdlib contextlib.asynccontextmanager. Can be removed
    and replaced with the stdlib version when we drop support for Python
    versions before 3.10.
    """
    try:
        yield thing
    finally:
        with suppress(Exception):
            await cast("AsyncGenerator", thing).aclose()
Ensure that an async generator is closed properly.

    Port from the stdlib contextlib.asynccontextmanager. Can be removed
    and replaced with the stdlib version when we drop support for Python
    versions before 3.10.
    
strawberry/utils/aio.py