                  node.right = self._insert(node.right, data)
                  node.right.parent = node
                  return node.right
              else:
                  return self._insert(node.right, data) 
</s> remove     "%run ../bst/bst.py\n",
    "%load ../bst/bst.py"
 </s> add     "# %load ../bst/bst.py\n",
    "class Node(object):\n",
    "\n",
    "    def __init__(self, data):\n",
    "        self.data = data\n",
    "        self.left = None\n",
    "        self.right = None\n",
    "        self.parent = None\n",
    "\n",
    "    def __repr__(self):\n",
    "        return str(self.data)\n",
    "\n",
    "\n",
    "class Bst(object):\n",
    "\n",
    "    def __init__(self, root=None):\n",
    "        self.root = root\n",
    "\n",
    "    def insert(self, data):\n",
    "        if data is None:\n",
    "            raise TypeError('data cannot be None')\n",
    "        if self.root is None:\n",
    "            self.root = Node(data)\n",
    "            return self.root\n",
    "        else:\n",
    "            return self._insert(self.root, data)\n",
    "\n",
    "    def _insert(self, node, data):\n",
    "        if node is None:\n",
    "            return Node(data)\n",
    "        if data <= node.data:\n",
    "            if node.left is None:\n",
    "                node.left = self._insert(node.left, data)\n",
    "                node.left.parent = node\n",
    "                return node.left\n",
    "            else:\n",
    "                return self._insert(node.left, data)\n",
    "        else:\n",
    "            if node.right is None:\n",
    "                node.right = self._insert(node.right, data)\n",
    "                node.right.parent = node\n",
    "                return node.right\n",
    "            else:\n",
    "                return self._insert(node.right, data)\n" </s> remove     "%run ../bst/bst.py\n",
    "%load ../bst/bst.py"
 </s> add     "# %load ../bst/bst.py\n",
    "class Node(object):\n",
    "\n",
    "    def __init__(self, data):\n",
    "        self.data = data\n",
    "        self.left = None\n",
    "        self.right = None\n",
    "        self.parent = None\n",
    "\n",
    "    def __repr__(self):\n",
    "        return str(self.data)\n",
    "\n",
    "\n",
    "class Bst(object):\n",
    "\n",
    "    def __init__(self, root=None):\n",
    "        self.root = root\n",
    "\n",
    "    def insert(self, data):\n",
    "        if data is None:\n",
    "            raise TypeError('data cannot be None')\n",
    "        if self.root is None:\n",
    "            self.root = Node(data)\n",
    "            return self.root\n",
    "        else:\n",
    "            return self._insert(self.root, data)\n",
    "\n",
    "    def _insert(self, node, data):\n",
    "        if node is None:\n",
    "            return Node(data)\n",
    "        if data <= node.data:\n",
    "            if node.left is None:\n",
    "                node.left = self._insert(node.left, data)\n",
    "                node.left.parent = node\n",
    "                return node.left\n",
    "            else:\n",
    "                return self._insert(node.left, data)\n",
    "        else:\n",
    "            if node.right is None:\n",
    "                node.right = self._insert(node.right, data)\n",
    "                node.right.parent = node\n",
    "                return node.right\n",
    "            else:\n",
    "                return self._insert(node.right, data)\n" </s> remove                 return right_child_index </s> add 
                  node.right = self._insert(node.right, data)
                  node.right.parent = node
                  return node.right
              else:

keep keep keep keep replace
 #273: Remove nose dependency for graphs_trees/ (#277) 
graphs_trees/bst/bst.py