code: def updateSelectionModel(self, components):
          
          # selmodel = self.selectionModel()
          # selmodel.clearSelection()
          selmodel = ComponentSelectionModel(self.model())
          self.setSelectionModel(selmodel)
          for comp in components:
              selmodel.selectComponent(comp)
          self.viewport().update()
docs: Creates a new selection model and adds *components* to it
  
          :param components: components in this view to add to the selection
          :type components: list<:class:`AbstractStimulusComponent<sparkle.stim.abstract_component.AbstractStimulusComponent>`