code: def cancel(self):
          
          if self._is_finished():
              for child in self.children:
                  child.cancel()
              return
          self._set_state(self.CANCELLED)
          self._drop_children()
          self.task_spec._on_cancel(self)
docs: Cancels the item if it was not yet completed, and removes
          any children that are LIKELY.