code: def edit_preferences(self, resource):
          
          schema = PreferencesSchema()
          json = self.service.encode(schema, resource)
  
          schema = PreferencesSchema()
          resp = self.service.patch(self.base+'preferences/', json=json)
          return self.service.decode(schema, resp)
docs: Edit preferences in /usr/cdrouter-data/etc/config.yml.
  
          :param resource: :class:`system.Preferences <system.Preferences>` object
          :return: :class:`system.Preferences <system.Preferences>` object
          :rtype: system.Preferences