code: def on_service_departure(self, svc_ref):
          
          with self._lock:
              if svc_ref is self.reference:
                  # Injected service going away...
                  service = self._value
  
                  # Clear the instance values
                  self._current_ranking = None
                  self._value = None
                  self.reference = None
  
                  if self.requirement.immediate_rebind:
                      # Look for a replacement
                      self._pending_ref = self._context.get_service_reference(
                          self.requirement.specification, self.requirement.filter
                      )
                  else:
                      self._pending_ref = None
  
                  self._ipopo_instance.unbind(self, service, svc_ref)
docs: Called when a service has been unregistered from the framework
  
          :param svc_ref: A service reference