I see.  So yeah, how about:
```
old_node = topic_tools.get_topic_by_path(local_content["path"])
if old_node:
    old_node.update(local_content)
else:
    parent_node = topic_tools.get_topic_by_path(base_path)
    parent_node["children"] += local_content
```