code: func (mgr *Mgr) ProcessAttributeRequests(requests []AttributeRequest, attributes []Attribute) (*Attributes, error) {
  	attrsMap := map[string]string{}
  	attrs := &Attributes{Attrs: attrsMap}
  	missingRequiredAttrs := []string{}
  	// For each of the attribute requests
  	for _, req := range requests {
  		// Get the attribute
  		name := req.GetName()
  		attr := getAttrByName(name, attributes)
  		if attr == nil {
  			if req.IsRequired() {
  				// Didn't find attribute and it was required; return error below
  				missingRequiredAttrs = append(missingRequiredAttrs, name)
  			}
  			// Skip attribute requests which aren't required
  			continue
  		}
  		attrsMap[name] = attr.GetValue()
  	}
  	if len(missingRequiredAttrs) > 0 {
  		return nil, errors.Errorf("The following required attributes are missing: %+v",
  			missingRequiredAttrs)
  	}
  	return attrs, nil
  }
docs: // ProcessAttributeRequests takes an array of attribute requests and an identity's attributes
  // and returns an Attributes object containing the requested attributes.