def check_valid_keys(self, obj):
invalid_keys = [<EOL>x for x in obj if x not in self.defaults<EOL>]<EOL>if invalid_keys:<EOL><INDENT>raise ValueError(<EOL>"<STR_LIT>"<EOL>% ("<STR_LIT:U+0020>".join(invalid_keys),<EOL>"<STR_LIT:U+0020>".join(self.defaults)))<EOL><DEDENT>
Given a dict of hyperparameter settings, throw an exception if any
keys are not defined in this HyperparameterDefaults instance.