def clean_whitespace(chatbot, statement):
    """
    Remove any consecutive whitespace characters from the statement text.
    """
    import re
    statement.text = statement.text.replace('\n', ' ').replace('\r', ' '
        ).replace('\t', ' ')
    statement.text = statement.text.strip()
    statement.text = re.sub(' +', ' ', statement.text)
    return statement
