code: def listen(obj, name, func):
      
      signals = vars(obj).setdefault('_signals', {})
      signals.setdefault(name, []).append(func)
docs: Arrange for `func(*args, **kwargs)` to be invoked when the named signal is
      fired by `obj`.