def sanitize(name):
    if name is None or name == '':
        raise Exception

    for keyword in case_sensitive_keywords:
        if name in keyword:
            name = name.replace(keyword, '')

    name = name.lower()
    for keyword in regex_keywords:
        name = re.sub(keyword, '', name)

    for keyword in print_keywords:
        if keyword in name:
            name = name.replace(keyword, '')

    for keyword in case_insensitive_keywords:
        if keyword in name:
            name = name.replace(keyword, '')

    name = _replace_roman_numerals(name.strip())
    name = re.sub('[\.\-_\[\(\)\]]', ' ', name)
    name = re.sub(' +', ' ', name)
    name = name.strip()

    return _get_year(name)
dataset/ETHPy150Open divijbindlish/movienamer/movienamer/sanitize.py/sanitize/swapped operands of `in`