def METHOD_NAME(self, other: "Dependency"):
    """Merge constraints, deptypes, and patches of other into self."""
    self.spec.constrain(other.spec)
    self.type |= other.type
    # concatenate patch lists, or just copy them in
    for cond, p in other.patches.items():
        if cond in self.patches:
            current_list = self.patches[cond]
            current_list.extend(p for p in other.patches[cond] if p not in current_list)
        else:
            self.patches[cond] = other.patches[cond]