Inserts new component *comp* at index

def insertComponent(self, index, comp):
        """Inserts new component *comp* at index"""
        # new component needs to be wrapped
        if self.columnCountForRow(index.row()) == 0:
            self.beginInsertRows(QtCore.QModelIndex(), index.row(), index.row())
            self._stim.insertComponent(comp, index.row(), index.column())
            self.endInsertRows()
        else:
            self._stim.insertComponent(comp, index.row(), index.column())

        self.samplerateChanged.emit(self._stim.samplerate())