#NEWLINE# def iterscribe( self , line , line_num , indentation , program_ast ) : #NEWLINE# #INDENT# ( variable_id , variable_type ) = utils . get_id_and_type ( line , program_ast ) #NEWLINE# for node in ast . walk ( program_ast ) : #NEWLINE# #INDENT# if ( ( 'iter' in node . _fields ) and ( ast . dump ( ast . parse ( line ) . body [ 0 ] ) in ast . dump ( node ) ) ) : #NEWLINE# #INDENT# line_number = ( node . lineno + self . offset ( ) ) #NEWLINE# self . desugared_lines . insert ( line_number , self . iter_start ( node , line , line_num , program_ast , indentation ) ) #NEWLINE# iterator_index = '' . join ( ( random . choice ( string . ascii_uppercase ) for _ in range ( 10 ) ) ) #NEWLINE# iterator_update = ( ( iterator_update + iterator_index ) + ' += 1\n' ) #NEWLINE# self . desugared_lines . insert ( line_number , ( ( indentation [ : ( - 4 ) ] + iterator_index ) + ' = -1\n' ) ) #NEWLINE# self . desugared_lines . append ( iterator_update ) #NEWLINE# output = ( ( ( ( ( ( "In iteration ' + str(" + iterator_index ) + ") + ', " ) + variable_id ) + " changed to ' + str(" ) + variable_id ) + ') ' ) #NEWLINE# return output #NEWLINE# #UNINDENT# #UNINDENT# raise KeyError ( 'Could not find for loop' )