#NEWLINE# def _extend_or_set_attribute( self , existing_image , image , attribute_name ) : #NEWLINE# #INDENT# attribute = image . get ( attribute_name , [ ] ) #NEWLINE# if attribute : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# existing_image [ attribute_name ] . extend ( attribute ) #NEWLINE# #UNINDENT# except KeyError : #NEWLINE# #INDENT# existing_image [ attribute_name ] = attribute