Did some chatgpting on this and found it:
Hypothetical Scenario:
Let's say you have 20 nodes and self.num_children is set to 4.
Your 20 nodes will be divided into 5 chunks (each with 4 nodes).
Each chunk will create a new parent node, so you'll have 5 new nodes.
If self.num_children is still 4, you will divide these 5 into chunks of size 4, leaving one chunk of size 1 (or another number smaller than 4).
The recursive function might result in 2 new nodes: one summarizing 4 nodes, and the other summarizing the remaining 1 node.
Guess through deduction that is how it should work based on current code but didnt expect that.