code: def remove_redundant_whitespaces(text):
      """remove redundant whitespaces"""
      return re.sub(" +", " ", text).strip()
  
imports: import argparse
  import collections
  import itertools
  import os
  import random
  import re
  import sys
label_desc: Use image node_id 2 for calling a global function with example usage: remove_redundant_whitespaces(text) and returns: re