title: How can I package a coroutine as normal function in event loop?
body: <p>I am using <em>asyncio</em> for a network framework.</p>
  
  <p>In below code(<code>low_level</code> is our low level function, <code>main</code> block is our program entry, <code>user_func</code> is user-defined function):</p>
  
  <pre><code>import asyncio
  
  loop = asyncio.get_event_loop()
  """:type :asyncio.AbstractEventLoop"""
  
  
  def low_level():
      yield from asyncio.sleep(2)
  
  
  def user_func():
      yield from low_level()
  
  
  if __name__ == '__main__':
      co = user_func()
      loop.run_until_complete(co)
  </code></pre>
  
  <p>I want wrap the <code>low_level</code> as normal function rather than <code>coroutine</code>(for <code>compatibility</code> etc.), but <code>low_level</code> is in event loop. How can wrap it as a normal function?</p>