There should be a function in `shared.topic_tools` to get a topic node from a path.  This function would literally become 2 or 3 lines: get the topic node, add as a child, save.