<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def notify_listeners(self, msg_type, params):
 """Send a message to all the observers."""

        for c in self.listeners:
            c.notify(msg_type, params)