code: def insertComponent(self, index, comp):
          
          # 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())
docs: Inserts new component *comp* at index