code: def stop(self):
          
          self._running = False
          if self._self_thread is not None:
              self._self_thread.cancel()
              self._self_thread = None
docs: Stop running scheduled function.