def get_by_attr(self, name):
        """ Safe accessor for looking up a node by :attr:`Node._attr_name` """
        try:
            attr = getattr(self, name)
        except __HOLE__:
            pass
        else:
            if isinstance(attr, Node):
                return attr
        raise AttributeError('Form attribute {0} couldn\'t be resolved to'
                             ' a Node'.format(name))
dataset/ETHPy150Open icook/yota/src/yota/__init__.py/Form.get_by_attr