How do we call a normal function where a coroutine is expected?
<p>Consider a coroutine which calls into another coroutine:</p>

<pre><code>async def foo(bar):
     result = await bar()
     return result
</code></pre>

<p>This works fine if <code>bar</code> is a coroutine.
What do I need to do (i.e. with what do I need to wrap the call to <code>bar</code>) so that this code does the right thing if <code>bar</code> is a normal function?</p>

<p>It is perfectly possible to define a coroutine with <code>async def</code> even if it never does anything asynchronous (i.e. never uses <code>await</code>).
However, the question asks how to wrap/modify/call a regular function <code>bar</code> inside the code for <code>foo</code> such that <code>bar</code> can be awaited.</p>