code: def setting(key, default=None, expected_type=None, qsettings=None):
      
      if default is None:
          default = inasafe_default_settings.get(key, None)
      full_key = '%s/%s' % (APPLICATION_NAME, key)
      return general_setting(full_key, default, expected_type, qsettings)
docs: Helper function to get a value from settings under InaSAFE scope.
  
      :param key: Unique key for setting.
      :type key: basestring
  
      :param default: The default value in case of the key is not found or there
          is an error.
      :type default: basestring, None, boolean, int, float
  
      :param expected_type: The type of object expected.
      :type expected_type: type
  
      :param qsettings: A custom QSettings to use. If it's not defined, it will
          use the default one.
      :type qsettings: qgis.PyQt.QtCore.QSettings
  
      :returns: The value of the key in the setting.
      :rtype: object