code: def _clean_space(s: str):
      """Removes trailing and leading spaces and collapses multiple consecutive internal spaces to a single one.
      This is borrowed from sacrebleu:
      https://github.com/mjpost/sacreBLEU/blob/069b0c88fceb29f3e24c3c19ba25342a3e7f96cb/sacrebleu.py#L1077
  
      Parameters
      ----------
      s
          The input string
  
      Returns
      -------
      ret
          The cleaned string
      """
      return re.sub(r"\s+", " ", s.strip())
  
imports: from typing import List, Union, IO, AnyStr, Tuple, Optional
  import re
  import os
  import argparse
  import zipfile
  import shutil
  import functools
  import tarfile
  import gzip
  import json
  from xml.etree import ElementTree
  from gluonnlp.data.filtering import ProfanityFilter
  from gluonnlp.utils.misc import file_line_number, download, load_checksum_stats
  from gluonnlp.base import get_data_home_dir, get_repo_url
label_desc: Use image node_id 2 for calling a global function with example usage: _clean_space(s) and returns: re