No, it mutates the input trie. If you call `insert(trie, "foo")` with an empty trie, it will be modified to look like
{'f': {'o': {'o': {END: True}}}}
I don't think this implementation is efficient enough to ever be worth using in a real program, though.