human
Complete this python program:
def last_word(text, include='alphanum_underscore'):
assistant
#Here is the Python code you requested.

    """Find the last word in a sentence.
    >>> last_word(\abc\)
    \abc\
    >>> last_word(\ abc\)
    \abc\
    >>> last_word(\\)
    >>> last_word(\ \)
    >>> last_word(\abc \)
    >>> last_word(\abc def\)
    \def\
    >>> last_word(\abc def \)
    >>> last_word(\abc def;\)
    >>> last_word(\bac $def\)
    \def\
    >>> last_word(\bac $def\, include=\most_punctuations\)
    \$def\
    >>> last_word(\bac \def\, include=\most_punctuations\)
    \\\\\def\
    >>> last_word(\bac \def;\, include=\most_punctuations\)
    \\\\\def;\
    >>> last_word(\bac::def\, include=\most_punctuations\)
    \def\
    >>> last_word(\"foo*bar\, include=\most_punctuations\)
    \"foo*bar\
    """
    if (not text):
        return ''
    if text[(-1)].isspace():
        return ''
    else:
        regex = cleanup_regex[include]
        matches = regex.search(text)
        if matches:
            return matches.group(0)
        else:
            return ''