code: def _notification_callback(method, params):
          
          def callback(future):
              try:
                  future.result()
                  log.debug("Successfully handled async notification %s %s", method, params)
              except Exception:  # pylint: disable=broad-except
                  log.exception("Failed to handle async notification %s %s", method, params)
          return callback
docs: Construct a notification callback for the given request ID.