      "        self.adj_weights[neighbor.key] = weight\n",
      "        self.adj_nodes[neighbor.key] = neighbor\n",
      "\n",
      "    def remove_neighbor(self, neighbor):\n",
      "        if neighbor is None:\n",
      "            raise Exception('Invalid neighbor')\n",
      "        if neighbor.key in self.adj_nodes:\n",
      "            neighbor.incoming_edges -= 1\n",
      "            del self.adj_weights[neighbor.key]\n",
      "            del self.adj_nodes[neighbor.key]\n",
      "        else:\n",
      "            raise Exception('Invalid neighbor')\n",
      "\n",
      "\n",
      "class Graph:\n",
      "\n",
 
</s> remove         if neighbor is None:
            raise Exception('Invalid neighbor')
        if neighbor.key in self.adj_nodes:
            neighbor.incoming_edges -= 1
            del self.adj_weights[neighbor.key]
            del self.adj_nodes[neighbor.key]
        else:
 </s> add         if neighbor is None or neighbor.key not in self.adj_nodes:
    "        if neighbor is None or neighbor.key not in self.adj_nodes:\n",
      "        self.adj_weights[neighbor.key] = weight\n",
      "        self.adj_nodes[neighbor.key] = neighbor\n",
      "\n",
      "    def remove_neighbor(self, neighbor):\n",
    "        if neighbor is None or neighbor.key not in self.adj_nodes:\n",
    "        if neighbor is None or neighbor.key not in self.adj_nodes:\n",
    "        if neighbor is None or neighbor.key not in self.adj_nodes:\n",
    "        if neighbor is None or neighbor.key not in self.adj_nodes:\n",
    "        if neighbor is None or neighbor.key not in self.adj_nodes:\n",
    "        if neighbor is None or neighbor.key not in self.adj_nodes:\n",
    "        if neighbor is None or neighbor.key not in self.adj_nodes:\n",
      "            raise Exception('Invalid neighbor')\n",
      "\n",
      "\n",
      "class Graph:\n",
      "\n",
keep keep keep keep replace replace replace replace replace replace replace keep keep keep keep keep
 Update graph remove_neighbor error handling (#93) 
graphs_trees/graph/graph_solution.ipynb