Notice that I made a few cosmetic changes: https://github.com/gem/oq-risklib/commit/12a7378ee760257e45903e55ee1ed13b76069688