code: function (id, value, context, location) {
              if (!location) {
                  location = this.getPreferenceLocation(id, context);
              }
              if (location && location.layer) {
                  var layer = this._layerMap[location.layer];
                  if (layer) {
                      if (this.data[layer.key] === undefined) {
                          this.data[layer.key] = {};
                      }
  
                      var wasSet = layer.set(this.data[layer.key], id, value, context, location.layerID);
                      this._dirty = this._dirty || wasSet;
                      return wasSet;
                  } else {
                      return false;
                  }
              } else {
                  return this._performSet(id, value);
              }
          }
docs: Sets the value for `id`. The value is set at the location given, or at the current
  location for the preference if no location is specified. If an invalid location is
  given, nothing will be set and no exception is thrown.
  
  @param {string} id Key to set
  @param {*} value Value for this key
  @param {Object=} context Optional additional information about the request (typically used for layers)
  @param {{layer: ?string, layerID: ?Object}=} location Optional location in which to set the value.
  If the object is empty, the value will be
  set at the Scope's base level.
  @return {boolean} true if the value was set