      "def dfs(root, visit_func):\n",
      "    if root is None:\n",
      "        return\n",
      "    visit_func(root)\n",
      "    root.visited = True\n",
      "    for node in root.adjacent:\n",
      "        if not node.visited:\n",
      "            dfs(node, visit_func)"
     ]
    },
 
</s> remove     "        if not node.visited:\n",
 </s> add     "        if node.visit_state == State.unvisited:\n", </s> remove     "    root.visited = True\n",
 </s> add     "    root.visit_state = State.visited\n", </s> remove     "            if not adj_node.visited:\n",
 </s> add     "            if adj_node.visit_state == State.unvisited:\n", </s> remove     "    start.visited = True\n",
 </s> add     "    start.visit_state = State.visited\n", </s> remove     "            if not adjacent_node.visited:\n",
 </s> add     "            if adjacent_node.visit_state == State.unvisited:\n",
    "    root.visit_state = State.visited\n",
      "def dfs(root, visit_func):\n",
      "    if root is None:\n",
      "        return\n",
      "    visit_func(root)\n",
    "    root.visit_state = State.visited\n",
      "    for node in root.adjacent:\n",
      "        if not node.visited:\n",
      "            dfs(node, visit_func)"
     ]
    },
keep keep keep keep replace keep keep keep keep keep
 Fixed issues with node state. 
graphs_trees/graph_dfs/dfs_solution.ipynb