#NEWLINE# def _create_collection_loader( self , context , key , _instance ) : #NEWLINE# #INDENT# def load_collection_from_joined_new_row( state , dict_ , row ) : #NEWLINE# #INDENT# collection = attributes . init_state_collection ( state , dict_ , key ) #NEWLINE# result_list = util . UniqueAppender ( collection , 'append_without_event' ) #NEWLINE# context . attributes [ ( state , key ) ] = result_list #NEWLINE# _instance ( row , result_list ) #NEWLINE# #UNINDENT# def load_collection_from_joined_existing_row( state , dict_ , row ) : #NEWLINE# #INDENT# if ( ( state , key ) in context . attributes ) : #NEWLINE# #INDENT# result_list = context . attributes [ ( state , key ) ] #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# collection = attributes . init_state_collection ( state , dict_ , key ) #NEWLINE# result_list = util . UniqueAppender ( collection , 'append_without_event' ) #NEWLINE# context . attributes [ ( state , key ) ] = result_list #NEWLINE# #UNINDENT# _instance ( row , result_list ) #NEWLINE# #UNINDENT# def load_collection_from_joined_exec( state , dict_ , row ) : #NEWLINE# #INDENT# _instance ( row , None ) #NEWLINE# #UNINDENT# return ( load_collection_from_joined_new_row , key , None , load_collection_from_joined_exec )