code: def cancel(self, method):
          
          if method in self._scheduledMethods:
              self._scheduledMethods.remove(method)
  
          if not self._scheduledMethods:
              self._timer.stop()
docs: Cancel scheduled method
          Safe method, may be called with not-scheduled method