code: async def _on_headline(self, update):
          
  
          name = update['service']
          message_obj = update['payload']
          new_headline = False
  
          if name not in self.services:
              return
  
          with self._state_lock:
              self.services[name].set_headline(message_obj['level'], message_obj['message'])
  
              if self.services[name].headline.count == 1:
                  new_headline = True
  
          # Notify about this service state change if anyone is listening
          # headline changes are only reported if they are not duplicates
          if self._on_change_callback and new_headline:
              self._on_change_callback(name, self.services[name].id, self.services[name].state, False, True)
docs: Receive a headline from a service.