code: def digit_to_text(text: str) -> str:
      
      if not text or not isinstance(text, str):
          return ""
  
      newtext = []
      for ch in text:
          if ch in _thai_arabic:
              ch = _thai_arabic[ch]
  
          if ch in _digit_spell:
              newtext.append(_digit_spell[ch])
          else:
              newtext.append(ch)
  
      return "".join(newtext)
docs: :param str text: Text with digits such as '1', '2', '๓', '๔'
      :return: Text with digits being spelled out in Thai