#NEWLINE# def set_data( self , data ) : #NEWLINE# #INDENT# assert ( len ( data ) == self . size [ 1 ] ) #NEWLINE# new_pixels = [ ] #NEWLINE# for row in data : #NEWLINE# #INDENT# assert ( len ( row ) == self . size [ 0 ] ) #NEWLINE# new_pixels . append ( row [ : ] ) #NEWLINE# #UNINDENT# self . pixels = new_pixels