#NEWLINE# @ classmethod #NEWLINE# def _factory( cls , lookup , synchronize_session , * arg ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# klass = lookup [ synchronize_session ] #NEWLINE# #UNINDENT# except KeyError : #NEWLINE# #INDENT# raise sa_exc . ArgumentError ( ( 'Valid strategies for session synchronization are %s' % ', ' . join ( sorted ( ( repr ( x ) for x in lookup ) ) ) ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return klass ( * arg )