def METHOD_NAME(self, word, term):
    """
    Inserts a word into the trie.
    :type word: str
    :rtype: void
    """
    node = self.root
    for letter in word:
        child = node.data.get(letter)
        if not child:
            node.data[letter] = TrieNode()
        node = node.data[letter]
    node.is_word = True
    node.term = term