code: def handle_whitespace(text):
      r
      text = re_retab.sub(sub_retab, text)
      text = re_whitespace.sub('', text).strip()
      return text
docs: r"""Handles whitespace cleanup.
  
      Tabs are "smartly" retabbed (see sub_retab). Lines that contain
      only whitespace are truncated to a single newline.