def METHOD_NAME(self, slide_name, widget, s, play_kwargs, **kwargs):
    del kwargs
    if slide_name in self.machine.active_slides:
        slide = self.machine.active_slides[slide_name]
        # remove any instances of this widget from this slide first
        slide.remove_widgets_by_key(s['key'])
        # add widget
        slide.add_widgets_from_library(name=widget, play_kwargs=play_kwargs, **s)