code: def with_uvloop_if_possible(f, *args, **kwargs):
      
      try:
          import uvloop
          import asyncio
          asyncio.set_event_loop_policy(uvloop.EventLoopPolicy())
          print('uvloop will be used')
      except ImportError:
          print('uvloop unavailable')
      return f(*args, **kwargs)
docs: Simple decorator to provide optional uvloop usage