<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _raise_or_append_exception(self):
 """The connection is presumably dead and we need to raise or append an exception. If we have a list for exceptions, append the exception and let the connection handle it, if not raise the exception here. :return: """

        message = (
            'Connection dead, no heartbeat or data received in >= '
            '%ds' % (
                self._interval * 2
            )
        )
        why = AMQPConnectionError(message)
        if self._exceptions is None:
            raise why
        self._exceptions.append(why)