code: def on_service_modify(self, svc_ref, old_properties):
          
          with self._lock:
              if self.reference is None:
                  # A previously registered service now matches our filter
                  return self.on_service_arrival(svc_ref)
              else:
                  # Check if the ranking changed the service to inject
                  best_ref = self._context.get_service_reference(
                      self.requirement.specification, self.requirement.filter
                  )
                  if best_ref is self.reference:
                      # Still the best service: notify the property modification
                      if svc_ref is self.reference:
                          # Call update only if necessary
                          self._ipopo_instance.update(
                              self, self._value, svc_ref, old_properties
                          )
                  else:
                      # A new service is now the best: start a departure loop
                      self.on_service_departure(self.reference)
  
              return None
docs: Called when a service has been modified in the framework
  
          :param svc_ref: A service reference
          :param old_properties: Previous properties values