<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _update_panic_status(self, status=None):
 """ Updates the panic status of the alarm panel. :param status: status to use to update :type status: boolean :returns: boolean indicating the new status """

        if status is None:
            return

        if status != self._panic_status:
            self._panic_status, old_status = status, self._panic_status

            if old_status is not None:
                self.on_panic(status=self._panic_status)

        return self._panic_status