code: func Set(ctx context.Context, section string, in interface{}) (context.Context, error) {
  	var err error
  	var data json.RawMessage
  	if in != nil {
  		if data, err = json.Marshal(in); err != nil {
  			return ctx, err
  		}
  		if data[0] != '{' {
  			return ctx, errors.New("LUCI_CONTEXT sections must always be JSON Objects")
  		}
  	}
  	cur := getCurrent(ctx)
  	if _, alreadyHas := cur.sections[section]; data == nil && !alreadyHas {
  		// Removing a section which is already missing is a no-op
  		return ctx, nil
  	}
  	newLctx := cur.clone()
  	if data == nil {
  		delete(newLctx.sections, section)
  	} else {
  		newLctx.sections[section] = &data
  	}
  	return context.WithValue(ctx, &lctxKey, newLctx), nil
  }
docs: // Set writes the json serialization of `in` as the given section into the
  // LUCI_CONTEXT, returning the new ctx object containing it. This ctx can be
  // passed to Export to serialize it to disk.
  //
  // If in is nil, it will clear that section of the LUCI_CONTEXT.
  //
  // The returned context is always safe to use, even if this returns an error.
  // This only returns an error if `in` cannot be marshalled to a JSON Object.