#NEWLINE# def union( self , other ) : #NEWLINE# #INDENT# 'Merge two heaps and returns new one (skew merging)' #NEWLINE# if ( not self ) : #NEWLINE# #INDENT# return other #NEWLINE# #UNINDENT# if ( not other ) : #NEWLINE# #INDENT# return self #NEWLINE# #UNINDENT# if ( self < other ) : #NEWLINE# #INDENT# return self . _make_heap ( self . root , other . union ( self . right ) , self . left ) #NEWLINE# #UNINDENT# return self . _make_heap ( other . root , self . union ( other . right ) , other . left )