trees class binarytree(tree) """abstract base class representing binary tree structure "" additional abstract methods def left(selfp) """return position representing left child return none if does not have left child "" raise notimplementederrormust be implemented by subclass def right(selfp) """return position representing right child return none if does not have right child "" raise notimplementederrormust be implemented by subclass concrete methods implemented in this class def sibling(selfp) """return position representing sibling (or none if no sibling"" parent self parent( if parent is nonep must be the root return none root has no sibling else if =self left(parent) return self right(parentpossibly none else return self left(parentpossibly none def children(selfp) """generate an iteration of positions representing children "" if self left(pis not none yield self left( if self right(pis not none yield self right(pcode fragment binarytree abstract base class that extends the existing tree abstract base class from code fragments and