<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _raw_recv(self):
 """ Return the next available IRC message in the buffer. """

        with self.lock:
            if self._index >= len(self._buffer):
                self._mcon()
            if self._index >= 199:
                self._resetbuffer()
                self._mcon()
            msg = self._buffer[self._index]
            while self.find(msg, 'PING :'):
                self._index += 1
                try:
                    msg = self._buffer[self._index]
                except IndexError:
                    self._mcon()
                    self.stepback(append=False)

            self._index += 1
            return msg