NumPy allowed · plain Python earns 10 bonus points
Implement fan-in aggregation, collecting multiple parallel branches' results back into one combined value when they rejoin at a shared downstream node.
Implement fan_in_aggregate(branch_results, aggregation_key). branch_results maps branch name -> that branch's partial state dict. Return the list of aggregation_key values from each branch (only including branches that actually have that key), sorted by branch name for determinism.
fan_in_aggregate(branch_results: dict[str, dict], aggregation_key: str) -> list