<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def sanitize_word(word):
 """ sanitize a word by removing its accents, special characters, etc """

    # use an unicode string for `unidecode`
    if type(word) == str:
        try:
            word = word.decode()
        except AttributeError:
            pass  # Python3

    # remove trailing spaces
    word = word.strip()

    # remove stuff between parentheses
    word = re.sub(r'\([^)]*\)', '', word)

    # remove accents, hyphens & other special chars
    word = re.sub(r'[ "\'-;.]+', '', unidecode(word))

    # only lowercase
    return word.lower()