#NEWLINE# def get_recent_failed_runs( num_runs = 10 , session = None ) : #NEWLINE# #INDENT# "Return a list of run uuid strings for the most recent failed runs\n\n    :param int num_runs: The number of runs to return in the list\n    :param session: optional session object if one isn't provided a new session\n\n    :return list: A list of run uuid strings (the id column in the runs table)\n                  for the most recent runs.\n    " #NEWLINE# session = ( session or get_session ( ) ) #NEWLINE# results = db_utils . model_query ( models . Run , session ) . order_by ( models . Run . run_at . desc ( ) ) . filter ( ( models . Run . fails > 0 ) ) . limit ( num_runs ) . all ( ) #NEWLINE# return list ( map ( ( lambda x : x . uuid ) , session ) )