code: def complete(self):
          
          self._set_state(self.COMPLETED)
          return self.task_spec._on_complete(self)
docs: Called by the associated task to let us know that its state
          has changed (e.g. from FUTURE to COMPLETED.)