import re


def _normalize_whitespace(string):
    """ Removes extra white space from a string. (Requires re)
    """
    string = string.strip()
    string = re.sub(r'\s+', ' ', string)
    return string