def extend(self, other):
overlap = [key for key in other.defaults if key in self.defaults]<EOL>if overlap:<EOL><INDENT>raise ValueError(<EOL>"<STR_LIT>" % "<STR_LIT:U+0020>".join(overlap))<EOL><DEDENT>new = dict(self.defaults)<EOL>new.update(other.defaults)<EOL>return HyperparameterDefaults(**new)<EOL>
Return a new HyperparameterDefaults instance containing the
hyperparameters from the current instance combined with
those from other.

It is an error if self and other have any hyperparameters in
common.