code: async def _notify_update(self, name, change_type, change_info=None, directed_client=None):
          
  
          for monitor in self._monitors:
              try:
                  result = monitor(name, change_type, change_info, directed_client=directed_client)
                  if inspect.isawaitable(result):
                      await result
              except Exception:
                  # We can't allow any exceptions in a monitor routine to break the server.
                  self._logger.warning("Error calling monitor with update %s", name, exc_info=True)
docs: Notify updates on a service to anyone who cares.