code: func CommonValueType(ts []*profile.ValueType) (*profile.ValueType, error) {
  	if len(ts) <= 1 {
  		return nil, nil
  	}
  	minType := ts[0]
  	for _, t := range ts[1:] {
  		if !compatibleValueTypes(minType, t) {
  			return nil, fmt.Errorf("incompatible types: %v %v", *minType, *t)
  		}
  		if ratio, _ := Scale(1, t.Unit, minType.Unit); ratio < 1 {
  			minType = t
  		}
  	}
  	rcopy := *minType
  	return &rcopy, nil
  }
docs: // CommonValueType returns the finest type from a set of compatible
  // types.