def validate(self):
method_names = sorted([i for i in dir(self) if i.startswith("<STR_LIT>") and callable(getattr(self, i))])<EOL>for method_name in method_names:<EOL><INDENT>method = getattr(self, method_name)<EOL>method()<EOL><DEDENT>
Validate attributes by running all self._validate_*() methods.

:raises TypeError: if an attribute has invalid type
:raises ValueError: if an attribute contains invalid value