Sorry, but this should be super quick. Can we remove the if-check altogether?
```python
for c in n['children']:
    prepend_parts(parts_prefix, c)
```