def _validateAttrs(self, keys):
badAttrs = []<EOL>for k in keys:<EOL><INDENT>if k not in self.__dict__:<EOL><INDENT>badAttrs.append("<STR_LIT>"%(k))<EOL><DEDENT><DEDENT>badAttrsMsg = os.linesep.join(badAttrs)<EOL>if not keys: return <EOL>if badAttrsMsg:<EOL><INDENT>raise ValueError("<STR_LIT>"%(list(self.__dict__), os.linesep, badAttrsMsg))<EOL><DEDENT>
prove that all attributes are defined appropriately