How to run code in python SDK mode when script component gets disabled

Duplicate thread: