'Add all variants in other that aren\'t in self to self. Also
constrain all multi-valued variants that are already present.
Return True if self changed, False otherwise
Args:
other (VariantMap): instance against which we constrain self
Returns:
bool: True or False'

def constrain(self, other):

    if ((other.spec is not None) and other.spec._concrete):
        for k in self:
            if (k not in other):
                raise UnsatisfiableVariantSpecError(self[k], '<absent>')
    changed = False
    for k in other:
        if (k in self):
            if (not self[k].compatible(other[k])):
                raise UnsatisfiableVariantSpecError(self[k], other[k])
            changed |= self[k].constrain(other[k])
        else:
            self[k] = other[k].copy()
            changed = True
    return changed
