#NEWLINE# def _FindNodeByEndpoint( self , endpoint ) : #NEWLINE# #INDENT# i = next ( ( idx for ( idx , node ) in enumerate ( self . _heap ) if ( node . endpoint == endpoint ) ) , 0 ) #NEWLINE# if ( i == 0 ) : #NEWLINE# #INDENT# return None #NEWLINE# #UNINDENT# return self . _heap [ i ]