code: def _romanize(word: str) -> str:
      
      if not isinstance(word, str) or not word:
          return ""
  
      word = _replace_vowels(_normalize(word))
      res = _RE_CONSONANT.findall(word)
  
      # 2-character word, all consonants
      if len(word) == 2 and len(res) == 2:
          word = list(word)
          word.insert(1, "o")
          word = "".join(word)
  
      word = _replace_consonants(word, res)
  
      return word
docs: :param str word: Thai word to be romanized, should have already been tokenized.
      :return: Spells out how the Thai word should be pronounced.