"""Definition of TreeNode:class TreeNode: def __init__(self, val): self.val = val self.left, self.right = None, None"""classSolution:""" @param root: The root of the binary search tree. @param node: insert this node into the binary search tree. @return: The root of the new binary search tree. """definsertNode(self,root,node):# write your code hereifroot==None:returnnodeifroot.val>node.val:ifroot.left==None:root.left=nodeelse:self.insertNode(root.left,node)else:ifroot.right==None:root.right=nodeelse:self.insertNode(root.right,node)returnroot