code: def add_observer(self, signal, observer):
          
  
          self._is_allowed_signal(signal)
          self._add_observer(signal, observer)
docs: Add an observer to the object.
  
          Raise an exception if the signal is not allowed.
  
          Parameters
          ----------
          signal : str
              a valid signal.
          observer : @func
              a function that will be called when the signal is emitted.