title: Python async function returning coroutine object
body: <p>I am running a python program to listen to azure iot hub. The function is returning me a coroutine object instead of a json. I saw that if we use async function and call it as a normal function this occurs, but i created a loop to get event and then used run_until_complete function. What am i missing here?</p>
  <pre><code>async def main():
      try:
          client = IoTHubModuleClient.create_from_connection_string(connection_string)
          print(client)
          client.connect() 
          while True:
              message = client.receive_message_on_input(&quot;input1&quot;)   # blocking call
              print(&quot;Message received on input1&quot;)
              print(type(message))
              print(message)
  
          
      except KeyboardInterrupt:
          print ( &quot;IoTHubClient sample stopped&quot; )
      except:
          print ( &quot;Unexpected error from IoTHub&quot; )
          return
  
  if __name__ == '__main__':
      loop = asyncio.get_event_loop()
      loop.run_until_complete(main())
      loop.close()
  </code></pre>
  <p>OUTPUT-
  Message received on input1
  &lt;class 'coroutine'&gt;
  &lt;coroutine object receive_message_on_input at 0x7f1439fe3a98&gt;</p>