      "    def _next_ancestor(self, node):\n",
      "        if node.parent is not None:\n",
      "            if node.parent.data > node.data:\n",
      "                return node.parent.data\n",
      "            return self._next_ancestor(node.parent)\n",
      "        # We reached the root, the original input node\n",
      "        # must be the largest element in the tree.\n",
      "        return None"
     ]
    },
 
</s> remove     "            raise Exception('Invalid input node')\n",
 </s> add     "            raise TypeError('node cannot be None')\n", </s> remove     "        return node.data\n",
 </s> add     "        else:\n",
    "            return node.data\n", </s> remove     "        return self._next_ancestor(node)\n",
 </s> add     "        else:\n",
    "            return self._next_ancestor(node)\n",
    "            else:\n",
    "                return self._next_ancestor(node.parent)\n",
      "    def _next_ancestor(self, node):\n",
      "        if node.parent is not None:\n",
      "            if node.parent.data > node.data:\n",
      "                return node.parent.data\n",
    "            else:\n",
    "                return self._next_ancestor(node.parent)\n",
      "        # We reached the root, the original input node\n",
      "        # must be the largest element in the tree.\n",
      "        return None"
     ]
    },
keep keep keep keep replace keep keep keep keep keep
 Update bst successor solution (#107)

Update bst successor solution 
graphs_trees/bst_successor/bst_successor_solution.ipynb