code: func computeMapping(source, target design.Object, sctx, tctx string) (map[string]string, error) {
  	attributeMap := make(map[string]string)
  	sourceMap := make(map[string]string)
  	targetMap := make(map[string]string)
  	for name, att := range source {
  		key := name
  		if keys, ok := att.Metadata[TransformMapKey]; ok {
  			if len(keys) == 0 {
  				return nil, fmt.Errorf("invalid metadata transform key: missing value on attribte %s of %s", name, sctx)
  			}
  			key = keys[0]
  		}
  		sourceMap[key] = name
  	}
  	for name, att := range target {
  		key := name
  		if keys, ok := att.Metadata[TransformMapKey]; ok {
  			if len(keys) == 0 {
  				return nil, fmt.Errorf("invalid metadata transform key: missing value on attribute %s of %s", name, tctx)
  			}
  			key = keys[0]
  		}
  		targetMap[key] = name
  	}
  	for key, attName := range sourceMap {
  		if targetAtt, ok := targetMap[key]; ok {
  			attributeMap[attName] = targetAtt
  		}
  	}
  	return attributeMap, nil
  }
docs: // computeMapping returns a map that indexes the target type definition object attributes with the
  // corresponding source type definition object attributes. An attribute is associated with another
  // attribute if their map key match. The map key of an attribute is the value of the TransformMapKey
  // metadata if present, the attribute name otherwise.
  // The function returns an error if the TransformMapKey metadata is malformed (has no value).