Add run_for and run_for_all_except helper functions.