#NEWLINE# def query( self , root , s , e ) : #NEWLINE# #INDENT# '\n        :type root: Node\n        ' #NEWLINE# if ( not root ) : #NEWLINE# #INDENT# return DEFAULT #NEWLINE# #UNINDENT# if ( ( s <= root . start ) and ( e >= root . end ) ) : #NEWLINE# #INDENT# return root . m #NEWLINE# #UNINDENT# if ( ( s >= root . end ) or ( e <= root . start ) ) : #NEWLINE# #INDENT# return DEFAULT #NEWLINE# #UNINDENT# l = self . query ( root . left , s , e ) #NEWLINE# r = self . query ( root . right , s , e ) #NEWLINE# return f ( l , r )