<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def on_success(self, inv_plugin, emit_set_slot):
 """ Called when the click was successful and should be applied to the inventory. Args: inv_plugin (InventoryPlugin):
 inventory plugin instance emit_set_slot (func):
 function to signal a slot change, should be InventoryPlugin().emit_set_slot """

        self.dirty = set()
        self.apply(inv_plugin)
        for changed_slot in self.dirty:
            emit_set_slot(changed_slot)