def set_root(self, node: BinaryTreeNode):
     if node:
         node.parent = None
     self.root = node