How to nest Async Context Managers in Python 3
<p>Suppose we had two async context managers that were commonly used together in a nested fashion, but only the result of the second is typically used in the body. For example, if we found ourselves typing this a lot:</p>

<pre><code>async with context_mgr_1() as cm1:
    async with cm2.context_mgr_2() as cm2:
        ...do something with cm2...
</code></pre>

<p>How can we create a single context manager which nests these context managers, so that we can just do:</p>

<pre><code>async with context_mgr_2() as cm2:
    ...do something with cm2...
</code></pre>

<p>contextlib.nested used to accomplish this for non-async context managers, but I have found no such helper in asyncio.</p>