def METHOD_NAME(self, row: int, column: int, parent: QModelIndex = None) -> QModelIndex:
    if parent is None:
        parent = QModelIndex()
    if parent.isValid():
        return QModelIndex()
    return self.createIndex(row, column, None)