code: def set_general_setting(key, value, qsettings=None):
      
      if not qsettings:
          qsettings = QSettings()
  
      qsettings.setValue(key, deep_convert_dict(value))
docs: Set value to QSettings based on key.
  
      :param key: Unique key for setting.
      :type key: basestring
  
      :param value: Value to be saved.
      :type value: QVariant
  
      :param qsettings: A custom QSettings to use. If it's not defined, it will
          use the default one.
      :type qsettings: qgis.PyQt.QtCore.QSettings