<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_chime_status(self, message=None, status=None):
 """ Uses the provided message to update the Chime state. :param message: message to use to update :type message: :py:class:`~alarmdecoder.messages.Message` :param status: chime status, overrides message bits. :type status: bool :returns: bool indicating the new status """

        chime_status = status
        if isinstance(message, Message):
            chime_status = message.chime_on

        if chime_status is None:
            return

        if chime_status != self._chime_status:
            self._chime_status, old_status = chime_status, self._chime_status

            if old_status is not None:
                self.on_chime_changed(status=self._chime_status)

        return self._chime_status