Remove quotes from `word` if the word starts and ands with quotes (" or ').

def _remove_quotes(word):
    """
    Remove quotes from `word` if the word starts and ands with quotes (" or ').
    """
    if not word or len(word) <= 2:
        return word

    if word[0] == word[-1] and word[0] in ["'", '"']:
        return word[1:-1]

    return word