def delayed_fail():
 time.sleep(5)
 raise ValueError('Expected failure.')

def delayed_fail ( ) : time . sleep ( 5 ) raise ValueError ( 'Expected failure.' )
delayed failure to make sure that processes are running before the error is raised .