code: def maybe_coroutine(obj):
      
      if six.PY3 and asyncio.iscoroutine(obj):
          return defer.ensureDeferred(obj)
      return obj
docs: If 'obj' is a coroutine and we're using Python3, wrap it in
      ensureDeferred. Otherwise return the original object.
  
      (This is to insert in all callback chains from user code, in case
      that user code is Python3 and used 'async def')