code: def is_recursive(self, child_item):
          
          ancestor = child_item.parent()
          # FIXME: indexes to data should be defined by a dictionary on init
          while ancestor:
              if (child_item.data(0, Qt.DisplayRole
                                  ) == ancestor.data(0, Qt.DisplayRole) and
                  child_item.data(7, Qt.DisplayRole
                                  ) == ancestor.data(7, Qt.DisplayRole)):
                  return True
              else:
                  ancestor = ancestor.parent()
          return False
docs: Returns True is a function is a descendant of itself.