code: def add_service(self, service):
          
          if service.protocol in self._services:
              existing = self._services[service.protocol]
              if not existing.superseeded_by(service):
                  return
  
          self._services[service.protocol] = service
docs: Add a new service.
  
          If the service already exists, it will be replaced.