code: def _run_on_completion(self, func, *args, **kwargs):
          
          if self._complete_func is not None:
              raise ValueError('Completion function already set for %s: %s' % (self.id_, self._complete_func))
  
          if not self.__event.is_set():
              self._complete_func = partial(func, self, *args, **kwargs)
          else:
              self.__run_completion_func(partial(func, self, *args, **kwargs), self.id_)
docs: Function to call when request has finished, after having been _set(). The first argument passed to func will
          be the request itself. Additional parameters are NOT validated. If the request is already finished, the given
          function will be run immediately (in same thread).