code: def Unbind(method):
      # pylint: disable=C0103
      
      if not isinstance(method, types.FunctionType):
          raise TypeError("@Unbind can only be applied on functions")
  
      # Tests the number of parameters
      validate_method_arity(method, "service", "service_reference")
  
      _append_object_entry(
          method,
          constants.IPOPO_METHOD_CALLBACKS,
          constants.IPOPO_CALLBACK_UNBIND,
      )
      return method
docs: The ``@Unbind`` callback decorator is called when a component dependency is
      unbound.
  
      The decorated method must accept the injected service object and its
      :class:`~pelix.framework.ServiceReference` as arguments::
  
         @Unbind
         def unbind_method(self, service, service_reference):
             '''
             service: The previously injected service instance.
             service_reference: Its ServiceReference
             '''
             # ...
  
      If the service is a required one, the unbind callback is called **after**
      the component has been invalidated.
  
      Exceptions raised by an unbind callback are ignored.
  
      :param method: The decorated method
      :raise TypeError: The decorated element is not a valid function