code: def removeRows(self, position, rows, parent = QtCore.QModelIndex()):
          
          self.beginRemoveRows(parent, position, position + rows - 1)
          for i in range(rows):
              self.model.removeRow(position)
              # cannot purge selection model, or else we have no way of 
              # recovering it when reordering
          self.endRemoveRows()
          if self.rowCount() == 0:
              self.emptied.emit(True)
          return True
docs: Removes parameters from the model. Emits and emptied True signal, if there are no parameters left.
  
          :param position: row location of parameters to remove
          :type position: int
          :param rows: number of parameters to remove
          :type rows: int
          :param parent: Required by QAbstractItemModel, can be safely ignored