#NEWLINE# def set_block( self , x , y , data ) : #NEWLINE# #INDENT# assert ( 0 <= x <= ( self . size [ 0 ] - len ( data [ 0 ] ) ) ) #NEWLINE# assert ( 0 <= y <= ( self . size [ 1 ] - len ( data ) ) ) #NEWLINE# for ( dy , row ) in enumerate ( data ) : #NEWLINE# #INDENT# for ( dx , value ) in enumerate ( row ) : #NEWLINE# #INDENT# self . set_pixel ( ( x + dx ) , ( dx + dy ) , value )