def data(self, index, role = QtCore.Qt.DisplayRole):
        if not index.isValid():
            return QtCore.QVariant()

        obj = index.internalPointer()
        obj_type = obj.get_type()

        if role == QtCore.Qt.DisplayRole:
            if (Object.GROUP, Object.USER) in obj.get_type():
                return QtCore.QVariant(obj.get_display_name())

        elif role == QtCore.Qt.UserRole:
            if obj_type == Object.GROUP:
                return QtCore.QVariant(obj.gid)
            elif obj_type == Object.USER:
                return QtCore.QVariant(obj.uri)

        elif role == QtCore.Qt.ToolTipRole:
            if obj_type == Object.USER:
                tool_tip = "%s (URI: %s)" % (obj.get_display_name(), obj.uri)
                return QtCore.QVariant(tool_tip)

        elif role == QtCore.Qt.DecorationRole:
            if obj_type == Object.USER:
                return QtGui.QPixmap("../icons/exit.png")

        return QtCore.QVariant()
dataset/ETHPy150Open shuge/Qt-Python-Binding-Examples/list_tree_and_table/treeview/simple_contact_list.py/Model.data/swapped operands of `in`