code: def cancel(self):
          '''
          Cancel the scheduled task.
          '''
          if (not self.cancelled) and (self._fn is not None):
              self._cancelled = True
              self._drop_fn(f cancel(self):
          '''
          Cancel the scheduled task.
          '''
          if (not self.cancelled) and (self._fn is not None):
              self._cancelled = True
              self._drop_fn()
docs: Cancel the scheduled task.