code: def clean_sentence(sentence, verbose=False):
      if sentence is None or len(sentence) == 0:
          if verbose:
              print("empty sentence")
          return ""
  
      # Remove code blocks
      sentence = re.sub("```.*?```", "", sentence, flags=re.DOTALL)
      sentence = re.sub("`.*?`", "", sentence, flags=re.DOTALL)
      sentence = re.sub("\(.*?\)", "", sentence, flags=re.DOTALL)
  
      # remove marks
      sentence = sentence.replace("```", "")
      sentence = sentence.replace("...", " ")
      sentence = sentence.replace("(", " ")
      sentence = sentence.replace(")", " ")
  
      sentence = sentence.replace("Dr. ", "Doctor ")
      sentence = sentence.replace(" w/ ", " with ")
  
      sentence = sentence.replace("H2O.ai", "aych two oh ae eye.")
      sentence = sentence.replace("H2O.AI", "aych two oh ae eye.")
      sentence = sentence.replace("h2o.ai", "aych two oh ae eye.")
      sentence = sentence.replace("h2o.ai", "aych two oh ae eye.")
  
      # filter out emojis
      if have_emoji:
          import emoji
  
          sentence = "".join(
              [x for x in sentence if not emoji.is_emoji(x)]
          )
  
      # fix floating expressions
      sentence = re.sub(r"(\d+)\.(\d+)", r"\1 dot \2", sentence)
  
      # Fix last bad characters
      sentence = re.sub(
          "([^\x00-\x7F]|\w)(\.|\。|\?|\!)", r"\1\2", sentence
      )
  
      sentence = sentence.strip()
  
      if (
          sentence.startswith(". ")
          or sentence.startswith("? ")
          or sentence.startswith("! ")
          or sentence.startswith(", ")
      ):
          sentence = sentence[2:]
      if (
          sentence.startswith(".")
          or sentence.startswith("?")
          or sentence.startswith("!")
          or sentence.startswith(",")
      ):
          sentence = sentence[1:]
  
      if sentence == "1.":
          sentence = "One"
      if sentence == "2.":
          sentence = "Two"
      if sentence == "3.":
          sentence = "Three"
      if sentence == "4.":
          sentence = "Four"
      if sentence == "5.":
          sentence = "Five"
      if sentence == "6.":
          sentence = "Six"
      if sentence == "7.":
          sentence = "Seven"
      if sentence == "8.":
          sentence = "Eight"
      if sentence == "9.":
          sentence = "Nine"
      if sentence == "10.":
          sentence = "Ten"
  
      if len(sentence) == 0:
          if verbose:
              print("EMPTY SENTENCE after processing")
          return ""
  
      if verbose:
          print("Sentence for speech: %s" % sentence)
  
      return sentence
  
file_path: h2ogpt/src/tts_sentence_parsing.py
imports: import textwrap
  import re
  from src.utils import flatten_list, have_emoji, have_langid
label_desc: Use image node_id 8 for calling a global function with example usage: clean_sentence(sentence, verbose) and returns: sentence, str, str