def delete_max(self):
<EOL>if self.left.red:<EOL><INDENT>self = self.rotate_right()<EOL><DEDENT>if self.right is NULL:<EOL><INDENT>return NULL, self.value<EOL><DEDENT>if not self.right.red and not self.right.left.red:<EOL><INDENT>self = self.move_red_right()<EOL><DEDENT>right, value = self.right.delete_max()<EOL>self = self._replace(right=right)<EOL>return self.balance(), value<EOL>
Delete the right-most value from a tree.