If you put the short "if error_score == 'raise': raise" condition first, this will be easier to read (mirroring a linguistic phenomenon that prefers short-to-long whose name I can't recall).