      "\n",
      "    def __init__(self, id):\n",
      "        self.id = id\n",
      "        self.visit_state = State.unvisited\n",
      "        self.adjacent = {}  # key = node, val = weight\n",
      "\n",
      "    def __str__(self):\n",
      "        return str(self.id)\n",
      "\n",
      "    def add_neighbor(self, neighbor, weight=0):\n",
 
</s> remove     "    def __init__(self, id):\n",
    "        self.id = id\n",
 </s> add     "    def __init__(self, key):\n",
    "        self.key = key\n", </s> remove     "    def __str__(self):\n",
    "        return str(self.id)\n",
 </s> add     "    def __lt__(self, other):\n",
    "        return self.key < other.key\n", </s> remove     "    def __init__(self, id):\n",
    "        # TODO: Implement me\n",
    "        self.adjacent = {}  # key = node, val = weight\n",
 </s> add     "    def __init__(self, key):\n",
    "        self.key = key\n",
    "        self.visit_state = State.unvisited\n",
    "        self.incoming_edges = 0\n",
    "        self.adj_nodes = {}  # Key = key, val = Node\n",
    "        self.adj_weights = {}  # Key = Node, val = weight\n", </s> remove     "    def __str__(self):\n",
 </s> add     "    def __repr__(self):\n", </s> remove     "        self.adjacent[neighbor] = weight\n",
 </s> add     "        if neighbor is None:\n",
    "            raise Exception('Invalid neighbor')\n",
    "        neighbor.incoming_edges += 1\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:\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",
    "        self.incoming_edges = 0\n",
    "        self.adj_nodes = {}  # Key = key, val = Node\n",
    "        self.adj_weights = {}  # Key = key, val = weight\n",
    "\n",
    "    def __repr__(self):\n",
    "        return str(self.key)\n",
      "\n",
      "    def __init__(self, id):\n",
      "        self.id = id\n",
      "        self.visit_state = State.unvisited\n",
    "        self.incoming_edges = 0\n",
    "        self.adj_nodes = {}  # Key = key, val = Node\n",
    "        self.adj_weights = {}  # Key = key, val = weight\n",
    "\n",
    "    def __repr__(self):\n",
    "        return str(self.key)\n",
      "\n",
      "    def __str__(self):\n",
      "        return str(self.id)\n",
      "\n",
      "    def add_neighbor(self, neighbor, weight=0):\n",
keep keep keep keep replace keep keep keep keep keep
 Rework graph challenge and solution (#90) 
graphs_trees/graph/graph_solution.ipynb