import re


def normalize_docstring(docstring):
    """
    Normalizes whitespace in the given string.

        >>> normalize_docstring('This     is\ta docstring.')
        'This is a docstring.'
    """
    return re.sub(r"[\r\n\t ]+", " ", docstring).strip()