def loadFromTemplate(template, stim=None):
        """Initialized this stimulus from a saved *template*

        :param template: doc from a previously stored stimulus via :class:`templateDoc`
        :type template: dict
        """
        stim = StimulusModel.loadFromTemplate(template, stim=stim)
        qstim = QStimulusModel(stim)
        qstim.setEditor(template['testtype'])
        return qstim
Initialized this stimulus from a saved *template*

        :param template: doc from a previously stored stimulus via :class:`templateDoc`
        :type template: dict