#NEWLINE# def _script_step_mapping( self , steps_desc ) : #NEWLINE# #INDENT# 'Return a mapping of ``self._step_key(step_num, step_type)`` ->\n        (place in sort order of all *script* steps), for the purposes of\n        choosing which protocols to use for input and output.\n\n        Non-script steps do not appear in the mapping.\n        ' #NEWLINE# mapping = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# script_step_num = 0 #NEWLINE# for ( i , step ) in enumerate ( steps_desc ) : #NEWLINE# #INDENT# if ( 'mapper' in step ) : #NEWLINE# #INDENT# if ( step [ 'mapper' ] [ 'type' ] == 'script' ) : #NEWLINE# #INDENT# k = self . _step_key ( i , 'mapper' ) #NEWLINE# mapping [ k ] = script_step_num #NEWLINE# script_step_num += 1 #NEWLINE# #UNINDENT# #UNINDENT# if ( 'reducer' in step ) : #NEWLINE# #INDENT# if ( step [ 'reducer' ] [ 'type' ] == 'script' ) : #NEWLINE# #INDENT# k = self . _step_key ( i , 'reducer' ) #NEWLINE# mapping [ script_step_num ] = script_step_num #NEWLINE# script_step_num += 1 #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# return mapping