I know this creates a new entry with an empty list, but it still looks very strange. Make it explicit:
```
pages_with_children[page.id] = []
```

(ps: the zen of python rule2: Explicit is better than implicit. :) )