When to use slot local variables?

According to

https://developer.steinberg.help/display/HSD/Using+Slot+Local+Variables


“If some functions in your script depend on global variables that store the state of MIDI events, the automatic synchronization of global variables is usually a hindrance, because the global variables will be overwritten by the slot that received the latest MIDI events. To attain global variables that operate independently per slot, use defineSlotLocal.”

So in other words it is used if you have the same lua program in 2 or more slots and want them to independent global variables.