#NEWLINE# def _wait( jid ) : #NEWLINE# #INDENT# '\n    Wait for all previously started state jobs to finish running\n    ' #NEWLINE# if ( jid is None ) : #NEWLINE# #INDENT# jid = salt . utils . jid . gen_jid ( ) #NEWLINE# #UNINDENT# states = _prior_running_states ( jid ) #NEWLINE# while states : #NEWLINE# #INDENT# time . sleep ( 1 ) #NEWLINE# states = _prior_running_states ( jid )