Utility function to calculate sum of all node of tree
def Sum ( t ) : NEW_LINE INDENT if ( t == None ) : NEW_LINE INDENT return 0 NEW_LINE DEDENT return t . key + Sum ( t . left ) + Sum ( t . right ) NEW_LINE DEDENT