code: def convert_num_to_words(_str: str, langid: str = "en") -> str:
      """
      Convert digits to corresponding words. Note this is a naive approach and could be replaced with text normalization.
      """
      if langid == "en":
          num_to_words = [
              "zero",
              "one",
              "two",
              "three",
              "four",
              "five",
              "six",
              "seven",
              "eight",
              "nine",
          ]
          _str = _str.strip()
          words = _str.split()
          out_str = ""
          num_word = []
          for word in words:
              if word.isdigit():
                  num = int(word)
                  while num:
                      digit = num % 10
                      digit_word = num_to_words[digit]
                      num_word.append(digit_word)
                      num = int(num / 10)
                      if not (num):
                          num_str = ""
                          num_word = num_word[::-1]
                          for ele in num_word:
                              num_str += ele + " "
                          out_str += num_str + " "
                          num_word.clear()
              else:
                  out_str += word + " "
          out_str = out_str.strip()
      else:
          logging.warning(
              "Currently support basic num_to_words in English only. Please use Text Normalization to convert other languages!",
              mode=LogMode.ONCE,
          )
      return out_str
  
file_path: NeMo/nemo/collections/asr/parts/utils/eval_utils.py
imports: import json
  from typing import Optional, Tuple, Union
  from torchmetrics.text import SacreBLEUScore
  from torchmetrics.text.rouge import ROUGEScore
  from nemo.collections.asr.metrics.wer import word_error_rate_detail
  from nemo.utils import logging
  from nemo.utils.nemo_logging import LogMode
label_desc: Use image node_id 3 for calling a global function with example usage: convert_num_to_words(_str, langid) and returns: out_str