<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def unjoin(self):
 """ Leave the local audience :rtype: None :raises SensorJoinException: Failed to leave """

        self.debug("()")
        if self._joined.is_set():
            packet = APPUnjoinMessage(device_id=Id.NOT_SET)
            self._send_packet(self._server_ip, self._server_port, packet)
            self._joined.clear()
            self.info("Left the audience")