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

        assert get_thread_ident() == self.ioloop_thread_id
        self._last_msg_id += 1
        return str(self._last_msg_id)