code: def execute(self, method, args, kwargs):
          
          # Normalize arguments
          if args is None:
              args = []
  
          if kwargs is None:
              kwargs = {}
  
          try:
              # Call the method
              result = method(*args, **kwargs)
          except Exception as ex:
              # Something went wrong: propagate to the event and to the caller
              self._done_event.raise_exception(ex)
              raise
          else:
              # Store the result
              self._done_event.set(result)
          finally:
              # In any case: notify the call back (if any)
              self.__notify()
docs: Execute the given method and stores its result.
          The result is considered "done" even if the method raises an exception
  
          :param method: The method to execute
          :param args: Method positional arguments
          :param kwargs: Method keyword arguments
          :raise Exception: The exception raised by the method