code: def tcc(text: str) -> str:
      
      if not text or not isinstance(text, str):
          return ""
  
      p = 0
      while p < len(text):
          m = PAT_TCC.match(text[p:])
          if m:
              n = m.span()[1]
          else:
              n = 1
          yield text[p : p + n]
          p += n
docs: TCC generator, generates Thai Character Clusters
      :param str text: text to be tokenized to character clusters
      :return: subword (character cluster)