def METHOD_NAME(self, row, column, parent):
    if not self.hasIndex(row, column, parent):
        return QtCore.QModelIndex()
    pitem = parent.internalPointer()
    if not pitem:
        pitem = self.rootnode
    item = pitem.child(row)
    if not item:
        return QtCore.QModelIndex()
    return self.createIndex(row, column, item)