code: def preprocess_text(inputs, remove_space=True, lower=False):
      """preprocess data by removing extra space and normalize data."""
      outputs = inputs
      if remove_space:
          outputs = " ".join(inputs.strip().split())
  
      outputs = unicodedata.normalize("NFKD", outputs)
      outputs = "".join(
          [c for c in outputs if not unicodedata.combining(c)]
      )
      if lower:
          outputs = outputs.lower()
  
      return outputs
  
imports: import collections
  import sentencepiece
  import unicodedata
  from .args import str2bool
label_desc: Use image node_id 2 for calling a global function with example usage: preprocess_text(inputs, remove_space, lower) and returns: outputs