In python,

Class Link – https://pastebin.com/RHTpdFsQ

Define a function called mirror0 which takes a binary tree as input, and which modifies that tree by mirroring its structure.

Define a function called mirror0 which takes a binary tree as input, and which modifies that tree by mirroring its structure. After mirroring, the tree should look Ike it is being viewed in a mirror 12 67 6 39 before calling mirror after calling mirror() A simple Binary Tree class is provided to you -you may only use the functions available in this class: class BinaryTree: def init__(self, data): self.data data self. left = None self.right None def insert.left(self, new_data): if self.left None: else: self.leftBinaryTree(new_data) t BinaryTree(new_data) t.left self.left self.left-t def insert_right(self, new data) if self.rightNone: self.right BinaryTree(new_data) else: t BinaryTree(new data) t.right-self.right self.right t def getleft(self return self.left def get right (self return self.right def setleft(self, tree) self. left = tree def set right(self, tree) self, right = tree def setdata(self, data): self.data data def getdata(self): return self.data You might like to use the following function, which prints a tree, to help you test your code: def print treeCt, level) print(‘ · * (level-4) + str(t.get_data())) if t.get-leftC2 != None:. printC'(L),end print tree(t.get leftO, level 1) if t.get rightO T-None printC (r), end print treeCt.getrightO, level 1) For example: Test Result t BinaryTreec’aa t.insert left(‘b L)b t.insert_rightC’Cr printtree(t, 0) mirrorc printtreeCt, 0) Show transcribed image text