#NEWLINE# def _expunge_state( self , state ) : #NEWLINE# #INDENT# if ( state in self . _new ) : #NEWLINE# #INDENT# self . _new . pop ( state ) #NEWLINE# state . _detach ( ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if self . identity_map . contains_state ( state ) : #NEWLINE# #INDENT# self . identity_map . discard ( state ) #NEWLINE# self . _deleted . pop ( self , None ) #NEWLINE# state . _detach ( ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if self . transaction : #NEWLINE# #INDENT# self . transaction . _deleted . pop ( state , None )