

def add(self, string):
    char = string[0]
    if (char in self.path):
        node = self.path[char]
    else:
        node = NaiveTrie()
        self.is_terminal = False
        self.path[char] = node
    if (len(string) > 1):
        remains = string[1:]
        node.add(remains)
    if self.is_terminal:
        self.path['_'] = NaiveTrie()

dataset/ETHPy150Open christabor/MoAL/MOAL/data_structures/trees/trie.py NaiveTrie.add/original