Break In Python Nested Functions Matlab