def index(self, row: int, column: int, parent: QModelIndex=...):
    if (not self.hasIndex(row, column, parent)):
        return QModelIndex()
    if (not parent.isValid()):
        parentItem = self.mRootItem
    else:
        parentItem = parent.internalPointer()
    try:
        childItem = parentItem.child(row)
        return self.createIndex(row, column, childItem)
    except IndexError:
        return QModelIndex()
def index(self, row: int, column: int, parent: QModelIndex=...):
    if (not self.hasIndex(row, column, parent)):
        return QModelIndex()
    if (not parent.isValid()):
        parentItem = self.mRootItem
    else:
        parentItem = parent.internalPointer()
    try:
        childItem = parentItem.child(row)
        return self.createIndex(row, column, childItem)
    except IndexError:
        return QModelIndex()