code: def listener(self, event, *args, **kwargs):
          
          if len(args) == 1 and callable(args[0]):
              raise RuntimeError("Cannot use the @listener decorator without "
                                 "arguments")
          kwargs['with_context'] = True  # This is the whole point of this plugin
          plugin = self.plugin
          reg = self.reg
  
          def wrapper(listener_f):
              nonlocal plugin, reg
              nonlocal event, args, kwargs
              return plugin._add_new_listener(reg, event, listener_f, *args,
                                              **kwargs)
          return wrapper
docs: Create a listener from a decorated function.
          :param event: Event to listen to.
          :type event: str
          :param args: captures all of the positional arguments passed in
          :type args: tuple(Any)
          :param kwargs: captures the keyword arguments passed in
          :type kwargs: dict(Any)
          :return: The function to use as the listener
          :rtype: fn