code: def earthquake_fatality_rate(hazard_level):
      
      earthquake_function = setting(
          'earthquake_function', EARTHQUAKE_FUNCTIONS[0]['key'], str)
      ratio = 0
      for model in EARTHQUAKE_FUNCTIONS:
          if model['key'] == earthquake_function:
              eq_function = model['fatality_rates']
              ratio = eq_function().get(hazard_level)
      return ratio
docs: Earthquake fatality ratio for a given hazard level.
  
      It reads the QGIS QSettings to know what is the default earthquake
      function.
  
      :param hazard_level: The hazard level.
      :type hazard_level: int
  
      :return: The fatality rate.
      :rtype: float