the find_min method is called to find the minimum key in subtree you should convince yourself that the minimum valued key in any binary search tree is the leftmost child of the tree therefore the find_min method simply follows the left_child references in each node of the subtree until it reaches node that does not have left child def find_successor(self)succ none if self has_right_child()succ self right_child find_min(elseif self parentif self is_left_child()succ self parent elseself parent right_child none succ self parent find_successor(self parent right_child self return succ def find_min(self)current self while current has_left_child()current current left_child return current def splice_out(self)if self is_leaf()if self is_left_child()self parent left_child none elseself parent right_child none elif self has_any_children()if self has_left_child()if self is_left_child()self parent left_child self left_child elseself parent right_child self left_child self left_child parent self parent elseif self is_left_child()self parent left_child self right_child elseself parent right_child self right_child self right_child parent self parent we need to look at one last interface method for the binary search tree suppose that we would like to simply iterate over all the keys in the tree in order this is definitely something we have done with dictionariesso why not treesyou already know how to traverse binary tree in orderusing the inorder traversal algorithm howeverwriting an iterator requires bit more worksince an iterator should return only one node each time the iterator is called binary search trees