<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def on_disconnect(self, code, stream_name, reason):
 """Called when a disconnect is received"""

        logger.error('Disconnect message: %s %s %s', code, stream_name, reason)
        return True