'Returns True is a function is a descendant of itself.'

def is_recursive(self, child_item):

    ancestor = child_item.parent()
    while ancestor:
        if ((child_item.data(0, Qt.DisplayRole) == ancestor.data(0, Qt.DisplayRole)) and (child_item.data(4, Qt.DisplayRole) == ancestor.data(4, Qt.DisplayRole))):
            return True
        else:
            ancestor = ancestor.parent()
    return False
