code: def set_interrupt(self, method=None, **kwargs):
          
          
          def action_wrap(f):
              action_id = kwargs.get("action_id", f.__name__)
              name = kwargs.get("name", action_id)
              if inspect.ismethod(f): # not "." in f.__qualname__:
                  self._interrupt = _ActionInterrupt(f)
                  self._ui_parameters["interrupt_enabled"] = True
                  return self._interrupt
              else:
                  qual_name = getattr(f, "__qualname__", None)
                  owner_class = kwargs.get("controller_class", None)
                  if owner_class:
                      qual_name = owner_class + "." + f.__name__
  
                  if qual_name:
                      Actions.add_unbound_interrupt(qual_name, self)
                  else:
                      print("using upython? if yes you need to pass the name of the controller class via the controller_class parameter.")    
                  return f
          
          if method:
              return action_wrap(method)
          else:
              return action_wrap
docs: Decorator that turns a function or controller method into an action interrupt.