There is a problem in this code.
Let's assume you are given in input an hazard calculation with two realizations (i.e. two hazard outputs).

In the original implementation, **for each hazard output** we collect in the ```aggregate_losses``` variable all the values (losses) in the ```event_loss_table``` dictionary having an id of the rupture as key value. Each rupture id is associated with the considered hazard output.

The new implementation instead collects all the losses (always the same losses) in the ```aggregate_losses``` table available in the computation.

That also means that we are lacking a qa test for risk calculators given an hazard calculation with several realizations (it is a known issue).