docs: def view_totlosses(token, dstore):
      """
      This is a debugging view. You can use it to check that the total
      losses, i.e. the losses obtained by summing the average losses on
      all assets are indeed equal to the aggregate losses. This is a
      sanity check for the correctness of the implementation.
      """
      oq = dstore['oqparam']
      tot_losses = dstore['losses_by_asset']['mean'].sum(axis=0)
      return rst_table(tot_losses.view(oq.loss_dt()), fmt='%.6E')