code: def publish(func):
      
  
      @wraps(func)
      def wrapper(self, *args, **kwargs):  # outgoing
          payload = func(self, *args, **kwargs)
          payload.pop('self', None)
          self._publish(func.__name__, payload)
          return None
  
      wrapper.is_publish = True
  
      return wrapper
docs: publish the return value of this function as a message from this endpoint