<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def fetch_mid(self):
 """ Gets the next valid MID. :return: the mid to use """

        current_mid = self._current_mid
        self._current_mid += 1
        self._current_mid %= 65535
        return current_mid