#NEWLINE# def _fetch_events_txn( self , txn , events , check_redacted = True , get_prev_content = False , allow_rejected = False ) : #NEWLINE# #INDENT# if ( not events ) : #NEWLINE# #INDENT# return { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# #UNINDENT# rows = self . _fetch_event_rows ( txn , events ) #NEWLINE# if ( not allow_rejected ) : #NEWLINE# #INDENT# rows [ : ] = [ r for r in rows if ( not r [ 'rejects' ] ) ] #NEWLINE# #UNINDENT# res = [ self . _get_event_from_row_txn ( txn , row [ 'internal_metadata' ] , row [ 'json' ] , row [ 'redacts' ] , check_redacted = check_redacted , get_prev_content = get_prev_content , rejected_reason = row [ 'rejects' ] ) for row in r ] #NEWLINE# return { r . event_id : r for r in res }