<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def add_observer(self, signal, observer):
 """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. """


        self._is_allowed_signal(signal)
        self._add_observer(signal, observer)