I need something in python that forces a method to exit if it couldn\'t finish its task completely. Imagine you have a pipeline (several steps) and I need to allow that pipe