code: def shutdown():
      
      global handler, transport, protocol
      if handler is not None:
          handler.close()
          transport.close()
          handler = None
          transport = None
          protocol = None
docs: Manually shutdown the async API.
  
      Cancels all related tasks and all the socket transportation.