code: async def set_update_cb(self, cb):
          
          if self._report_task is not None and not self._report_task.cancelled():
              self.loop.create_task(self._report_task.cancel())
          self._update_cb = cb
          if cb is not None:
              self._report_task = self.loop.create_task(self._report())
docs: Register the update callback.