code: def maybe_normalize_for_digits(label):
      # first, try to identify numbers like "50 000", "260 000"
      if " " in label:
          if any(s.isdigit() for s in label):
              thousands = re.compile(r"(\d{1,3}(?:\s*\d{3})*(?:,\d+)?)")
              maybe_thousands = thousands.findall(label)
              if len(maybe_thousands) > 0:
                  while True:
                      (label, r) = re.subn(
                          r"(\d)\s(\d{3})", "\\1\\2", label
                      )
                      if r == 0:
                          break
  
      # this might be a time or duration in the form "hh:mm" or "hh:mm:ss"
      if ":" in label:
          for s in label.split(" "):
              if any(i.isdigit() for i in s):
                  date_or_time = re.compile(
                      r"(\d{1,2}):(\d{2}):?(\d{2})?"
                  )
                  maybe_date_or_time = date_or_time.findall(s)
                  if len(maybe_date_or_time) > 0:
                      maybe_hours = maybe_date_or_time[0][0]
                      maybe_minutes = maybe_date_or_time[0][1]
                      maybe_seconds = maybe_date_or_time[0][2]
                      if len(maybe_seconds) > 0:
                          label = label.replace(
                              "{}:{}:{}".format(
                                  maybe_hours,
                                  maybe_minutes,
                                  maybe_seconds,
                              ),
                              "{} heures {} minutes et {} secondes".format(
                                  maybe_hours,
                                  maybe_minutes,
                                  maybe_seconds,
                              ),
                          )
                      else:
                          label = label.replace(
                              "{}:{}".format(
                                  maybe_hours, maybe_minutes
                              ),
                              "{} heures et {} minutes".format(
                                  maybe_hours, maybe_minutes
                              ),
                          )
  
      new_label = []
      # pylint: disable=too-many-nested-blocks
      for s in label.split(" "):
          if any(i.isdigit() for i in s):
              s = s.replace(
                  ",", "."
              )  # num2words requires "." for floats
              s = s.replace(
                  '"', ""
              )  # clean some data, num2words would choke on 1959"
  
              last_c = s[-1]
              if (
                  not last_c.isdigit()
              ):  # num2words will choke on "0.6.", "24 ?"
                  s = s[:-1]
  
              if any(
                  i.isalpha() for i in s
              ):  # So we have any(isdigit()) **and** any(sialpha), like "3D"
                  ns = []
                  for c in s:
                      nc = c
                      if c.isdigit():  # convert "3" to "trois-"
                          try:
                              nc = num2words(c, lang="fr") + "-"
                          except decimal.InvalidOperation as ex:
                              print(
                                  "decimal.InvalidOperation: '{}'".format(
                                      s
                                  )
                              )
                              raise ex
                      ns.append(nc)
                  s = "".join(s)
              else:
                  try:
                      s = num2words(s, lang="fr")
                  except decimal.InvalidOperation as ex:
                      print("decimal.InvalidOperation: '{}'".format(s))
                      raise ex
          new_label.append(s)
      return " ".join(new_label)
  
imports: import csv
  import sys
  import os
  import progressbar
  import subprocess
  import zipfile
  from glob import glob
  from multiprocessing import Pool
  import hashlib
  import decimal
  import math
  import unicodedata
  import re
  import sox
  import xml.etree.ElementTree
  import requests
  import json
  from deepspeech_training.util.downloader import SIMPLE_BAR, maybe_download
  from deepspeech_training.util.helpers import secs_to_hours
  from deepspeech_training.util.importers import get_counter, get_importers_parser, get_imported_samples, get_validate_label, print_import_report
  from ds_ctcdecoder import Alphabet
label_desc: Use image node_id 4 for calling a global function with example usage: maybe_normalize_for_digits(label) and returns: str