def verify(self, **kwargs):
_spec = self.c_param<EOL>try:<EOL><INDENT>_allowed = self.c_allowed_values<EOL><DEDENT>except KeyError:<EOL><INDENT>_allowed = {}<EOL><DEDENT>for (attribute, (typ, required, _, _, na)) in _spec.items():<EOL><INDENT>if attribute == "<STR_LIT:*>":<EOL><INDENT>continue<EOL><DEDENT>try:<EOL><INDENT>val = self._dict[attribute]<EOL><DEDENT>except KeyError:<EOL><INDENT>if required:<EOL><INDENT>raise MissingRequiredAttribute("<STR_LIT:%s>" % attribute)<EOL><DEDENT>continue<EOL><DEDENT>else:<EOL><INDENT>if typ == bool:<EOL><INDENT>pass<EOL><DEDENT>elif not val:<EOL><INDENT>if required:<EOL><INDENT>raise MissingRequiredAttribute("<STR_LIT:%s>" % attribute)<EOL><DEDENT>continue<EOL><DEDENT><DEDENT>try:<EOL><INDENT>_allowed_val = _allowed[attribute]<EOL><DEDENT>except KeyError:<EOL><INDENT>pass<EOL><DEDENT>else:<EOL><INDENT>if not self._type_check(typ, _allowed_val, val, na):<EOL><INDENT>raise NotAllowedValue(val)<EOL><DEDENT><DEDENT><DEDENT>return True<EOL>
Make sure all the required values are there and that the values are
of the correct type