<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 a unique message ID."""

        msgid = self._id_template.format(self._next_id)
        self._next_id += 1
        return msgid