code: def cleanup_text(text):
      text = text.strip()
  
      # Prefer non-unicode special character
      SWITCH_LIST = [
          ("\u2019", "'"),
          ("\u2018", "'"),
          ("\u201d", '"'),
          ("\u201c", '"'),
          ("\u2014", "--"),
          ("\u2013", "--"),
          ("\u3002", ". "),
          ("\u2032", "'"),
          ("\u3001", ", "),
      ]
      for before, after in SWITCH_LIST:
          text = text.replace(before, after)
  
      # fix some broken sentence tokenization
      text = re.sub(BADSENT, r" . \1", text)
  
      ALL_COUNTS.update(
          [t for t in text.split() if len(t) == 1 and ord(t) > 127]
      )
      return text.strip()
  
imports: import json
  import os
  import re
  from collections import Counter
  from typing import Counter
  from parlai.utils.io import PathManager
label_desc: Use image node_id 1 for calling a global function with example usage: cleanup_text(text) and returns: text