docs: def get_loss_maps(dstore, kind):
      """
      :param dstore: a DataStore instance
      :param kind: 'rlzs' or 'stats'
      """
      oq = dstore['oqparam']
      name = 'loss_maps-%s' % kind
      if name in dstore:  # event_based risk
          return _to_loss_maps(dstore[name].value, oq.loss_maps_dt())
      name = 'loss_curves-%s' % kind
      if name in dstore:  # classical_risk
          # the loss maps are built on the fly from the loss curves
          loss_curves = dstore[name]
          loss_maps = scientific.broadcast(
              scientific.loss_maps, loss_curves, oq.conditional_loss_poes)
          return loss_maps
      raise KeyError('loss_maps/loss_curves missing in %s' % dstore)