def convert(self, s):
    parts = TokenTranslator._BREAK_ON_RE.split(s)
    parts_iter = iter(parts)
    converted_parts = []
    for part in parts_iter:
      if part == '' or TokenTranslator._DELIMITER_RE.match(part):
        converted_parts.append(part)
      elif TokenTranslator._UPPER_CASE_RE.match(part):
        # Join to the rest of the word, if any.
        token = part
        try:
          token += parts_iter.next()
        except __HOLE__:
          pass
        converted_parts.append(self._convert_single_token(token))
      else:
        converted_parts.append(self._convert_single_token(part))
    return self.handle_conversion(s, ''.join(converted_parts))
dataset/ETHPy150Open pantsbuild/pants/src/python/pants/backend/jvm/tasks/jvm_compile/anonymizer.py/TokenTranslator.convert