def insert(self, stim, position):
        """Inserts a new stimulus into the list at the given position

        :param stim: stimulus to insert into protocol
        :type stim: :class:`StimulusModel<sparkle.stim.stimulus_model.StimulusModel>`
        :param position: index (row) of location to insert to
        :type position: int
        """
        if position == -1:
            position = self.rowCount()
        stim.setReferenceVoltage(self.caldb, self.calv)
        stim.setCalibration(self.calibrationVector, self.calibrationFrequencies, self.calibrationFrange)
        self._tests.insert(position, stim)
Inserts a new stimulus into the list at the given position

        :param stim: stimulus to insert into protocol
        :type stim: :class:`StimulusModel<sparkle.stim.stimulus_model.StimulusModel>`
        :param position: index (row) of location to insert to
        :type position: int