<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _message_received(self, message):
 """Notify the observers about the received message."""

        with self.lock:
            self._state.receive_message(message)
            for callable in chain(self._on_message_received, self._on_message):
                callable(message)