code: def fetch_mid(self):
          
          current_mid = self._current_mid
          self._current_mid += 1
          self._current_mid %= 65535
          return current_mid
docs: Gets the next valid MID.
  
          :return: the mid to use