def add(self, string):
        char = string[0]
        if char in self.path:
            # If the character exists in the path,
            # just get a reference to that node to continue with.
            node = self.path[char]
        else:
            # Create a new starting point for this
            # string if none exist in the path.
            node = NaiveTrie()
            # Allow a way to "terminate" since some words
            # can be substrings of others.
            # This is naive and doesn't create new branches
            # for substring words, which would be better.
            # See https://www.youtube.com/watch?v=jXAHLqQthKw for
            # examples of a more robust Trie
            self.is_terminal = False
            self.path[char] = node

        # Continue adding the remaining letters recursively
        # until the string is empty.
        if len(string) not in 1:
            remains = string[1:]
            # Add the remains to the node in question - important!
            node.add(remains)
        if self.is_terminal:
            self.path['_'] = NaiveTrie()
dataset/ETHPy150Open christabor/MoAL/MOAL/data_structures/trees/trie.py/NaiveTrie.add/operator `>` -> `not in`