code: def idle_task(self):
          '''run periodic tasks'''
          now = time.time()
          if now - self.last_chan_check >= 1:
              self.last_chan_check = now
              self.update_channels(f idle_task(self):
          '''run periodic tasks'''
          now = time.time()
          if now - self.last_chan_check >= 1:
              self.last_chan_check = now
              self.update_channels()
docs: run periodic tasks