code: def normalize_whitespace(s):
      """
      Remove leading and trailing whitespace, and convert internal
      stretches of whitespace to a single space.
      """
      return " ".join(s.split())
  
imports: from numpy.distutils.from_template import process_str
  from numpy.testing import assert_equal
label_desc: Use image node_id 1 for calling a global function with example usage: normalize_whitespace(s) and returns: str