Decorator used to declare that the property is attribute of embedded tag

def tag_value(func):
    """
    Decorator used to declare that the property is attribute of embedded tag
    """
    def inner(self):
        tag, attrib, attrib_type = func(self)
        tag_obj = self.et.find(tag)

        if tag_obj is not None:
            try:
                return attrib_type(self.et.find(tag).attrib[attrib])
            except KeyError:
                raise AttributeError

    return inner