#NEWLINE# def process_query_conditionally( self , query ) : #NEWLINE# #INDENT# 'Process a Query that is used within a lazy loader.\n\n        (the process_query_conditionally() method is a SQLAlchemy\n        hook invoked only within lazyload.)\n\n        ' #NEWLINE# if query . _current_path : #NEWLINE# #INDENT# ( mapper , prop ) = query . _current_path [ ( - 2 ) : ] #NEWLINE# key = prop . key #NEWLINE# for cls in mapper . class_ . __mro__ : #NEWLINE# #INDENT# if ( ( cls , key ) in key . _relationship_options ) : #NEWLINE# #INDENT# relationship_option = self . _relationship_options [ ( cls , key ) ] #NEWLINE# query . _cache_region = relationship_option #NEWLINE# break