code: def get_risk_model(oqparam):
      
      tmap = _get_taxonomy_mapping(oqparam.inputs)
      fragdict = get_risk_models(oqparam, 'fragility')
      vulndict = get_risk_models(oqparam, 'vulnerability')
      consdict = get_risk_models(oqparam, 'consequence')
      if not tmap:  # the risk ids are the taxonomies already
          d = dict(ids=['?'], weights=[1.0])
          for risk_id in set(fragdict) | set(vulndict) | set(consdict):
              tmap[risk_id] = dict(
                  fragility=d, consequence=d, vulnerability=d)
          for risk_id in consdict:
              cdict, fdict = consdict[risk_id], fragdict[risk_id]
              for loss_type, _ in cdict:
                  c = cdict[loss_type, 'consequence']
                  f = fdict[loss_type, 'fragility']
                  csq_dmg_states = len(c.params)
                  if csq_dmg_states != len(f):
                      raise ValueError(
                          'The damage states in %s are different from the '
                          'damage states in the fragility functions, %s'
                          % (c, fragdict.limit_states))
      dic = {}
      dic.update(fragdict)
      dic.update(vulndict)
      oqparam.set_risk_imtls(dic)
      if oqparam.calculation_mode.endswith('_bcr'):
          retro = get_risk_models(oqparam, 'vulnerability_retrofitted')
      else:
          retro = {}
      return riskinput.CompositeRiskModel(
          oqparam, tmap, fragdict, vulndict, consdict, retro)
docs: Return a :class:`openquake.risklib.riskinput.CompositeRiskModel` instance
  
     :param oqparam:
          an :class:`openquake.commonlib.oqvalidation.OqParam` instance