'Generic logic to get the attribute or parent attribute for a task value.'

def _get_parent_attribute(self, attr, extend=False, prepend=False):

    value = None
    try:
        value = self._attributes[attr]
        if (self._parent and ((value is None) or extend)):
            parent_value = getattr(self._parent, attr, None)
            if extend:
                value = self._extend_value(value, parent_value, prepend)
            else:
                value = parent_value
    except KeyError:
        pass
    return value
