def METHOD_NAME(
    self, parent: QModelIndex, start: int, end: int
):
    if not parent.isValid():
        return
    if not self._accept_index(parent):
        return
    self.beginInsertRows(self.mapFromSource(parent), start, end)