docs: def load_riskmodel(self):
          # to be called before read_exposure
          # NB: this is called even if there is no risk model
          """
          Read the risk model and set the attribute .riskmodel.
          The riskmodel can be empty for hazard calculations.
          Save the loss ratios (if any) in the datastore.
          """
          logging.info('Reading the risk model if present')
          self.riskmodel = readinput.get_risk_model(self.oqparam)
          if not self.riskmodel:
              parent = self.datastore.parent
              if 'risk_model' in parent:
                  self.riskmodel = riskinput.CompositeRiskModel.read(parent)
              return
          if self.oqparam.ground_motion_fields and not self.oqparam.imtls:
              raise InvalidFile('No intensity_measure_types specified in %s' %
                                self.oqparam.inputs['job_ini'])
          self.save_params()