binary tree constructor def init (self)"""create an initially empty binary tree ""self root none self size public accessors def len (self)"""return the total number of elements in the tree ""return self size def root(self)"""return the root position of the tree (or none if tree is empty""return self make position(self rootdef parent(selfp)"""return the position of parent (or none if is root""node self validate(preturn self make position(node parentdef left(selfp)"""return the position of left child (or none if no left child""node self validate(preturn self make position(node leftdef right(selfp)"""return the position of right child (or none if no right child""node self validate(preturn self make position(node rightdef num children(selfp)"""return the number of children of position ""node self validate(pcount left child exists if node left is not nonecount + right child exists if node right is not nonecount + return count code fragment public accessors for our linkedbinarytree class the class begins in code fragment and continues in code fragments and