def insert_in_bst(root, node):
    """
    Insert node in the binary search tree

    :param root: root node of the binary search tree
    :type root: TreeNode
    :param node: node to insert
    :type node: TreeNode
    :return: root node
    :rtype: TreeNode
    """
    if root is None:
        root = node
    else:

        if root.val < node.val:
            if root.right is None:
                root.right = node
            else:
                insert_in_bst(root.right, node)
        else:
            if root.left is None:
                root.left = node
            else:
                insert_in_bst(root.left, node)
    return root