title: Test if coroutine was awaited or not
body: <p>I have an asynchronous function which connects to a database. Currently 
  my users do:</p>
  
  <pre><code>conn = await connect(uri, other_params)
  </code></pre>
  
  <p>I want to continue to support this, but want to additionally allow <code>connect()</code> to be used as a context manager:</p>
  
  <pre><code>async with connect(uri, other_params) as conn:
       pass
  </code></pre>
  
  <p>The difference between these two scenarios is that in the first case <code>connect</code> is awaited, and in the second case it is not.</p>
  
  <p>Is it possible to tell, <em>within the body of <code>connect</code></em>, if the coroutine was awaited or not?</p>
  
  <p>My current effort at this on <a href="https://repl.it/repls/DefensiveCompleteConfig" rel="nofollow noreferrer">repl.it</a>.</p>