code: def refresh(self):
          
          try:
              if self._timeout_event:
                  self._scheduler.cancel(self._timeout_event)
  
          # Timeout event has been popped from queue prematurely
          except exception.EventNotFound:
              pass
  
          # Ensure a new event is scheduled always
          finally:
              self._timeout_event = self._scheduler.event_later(
                                        self._timeout_seconds,
                                        ('_idle', {'seconds': self._timeout_seconds}))
docs: Refresh timeout timer