def __getattr__(self, key):
if key not in self or not self._valid_name(key):<EOL><INDENT>raise AttributeError(<EOL>"<STR_LIT>".format(<EOL>cls=self.__class__.__name__, name=key<EOL>)<EOL>)<EOL><DEDENT>return self._build(self[key])<EOL>
Access an item as an attribute.