code: def observer(self, component_type=ComponentType):
          
          def inner(func):
              self.add_observer(func, component_type)
              return func
          return inner
docs: You can use ``@broker.observer()`` as a decorator to your callback
          instead of :func:`Broker.add_observer`.