docs: def classical_bcr(riskinputs, riskmodel, param, monitor):
      """
      Compute and return the average losses for each asset.
  
      :param riskinputs:
          :class:`openquake.risklib.riskinput.RiskInput` objects
      :param riskmodel:
          a :class:`openquake.risklib.riskinput.CompositeRiskModel` instance
      :param param:
          dictionary of extra parameters
      :param monitor:
          :class:`openquake.baselib.performance.Monitor` instance
      """
      R = riskinputs[0].hazard_getter.num_rlzs
      result = AccumDict(accum=numpy.zeros((R, 3), F32))
      for ri in riskinputs:
          for out in riskmodel.gen_outputs(ri, monitor):
              for asset, (eal_orig, eal_retro, bcr) in zip(
                      ri.assets, out['structural']):
                  aval = asset['value-structural']
                  result[asset['ordinal']][out.rlzi] = numpy.array([
                      eal_orig * aval, eal_retro * aval, bcr])
      return {'bcr_data': result}