      "        with captured_output() as (out, err):\n",
      "            pre_order_traversal(node, sys.stdout.write)\n",
      "            assert_equal(out.getvalue().strip(), '52138')\n",
      "\n",
      "        with captured_output() as (out, err):\n",
      "            post_order_traversal(node, sys.stdout.write)\n",
      "            assert_equal(out.getvalue().strip(), '13285')\n",
      "\n",
      "        node = Node(1)\n",
      "        insert(node, 2)\n",
      "        insert(node, 3)\n",
      "        insert(node, 4)\n",
 
</s>
    "        post_order_traversal(node, self.results.add_result)\n",
    "        assert_equal(str(self.results), \"[1, 3, 2, 8, 5]\")\n",
    "        self.results.clear_results()\n",
      "        with captured_output() as (out, err):\n",
      "            pre_order_traversal(node, sys.stdout.write)\n",
      "            assert_equal(out.getvalue().strip(), '52138')\n",
      "\n",
    "        post_order_traversal(node, self.results.add_result)\n",
    "        assert_equal(str(self.results), \"[1, 3, 2, 8, 5]\")\n",
    "        self.results.clear_results()\n",
    "        post_order_traversal(node, self.results.add_result)\n",
    "        assert_equal(str(self.results), \"[1, 3, 2, 8, 5]\")\n",
    "        self.results.clear_results()\n",
    "        post_order_traversal(node, self.results.add_result)\n",
    "        assert_equal(str(self.results), \"[1, 3, 2, 8, 5]\")\n",
    "        self.results.clear_results()\n",
      "\n",
      "        node = Node(1)\n",
      "        insert(node, 2)\n",
      "        insert(node, 3)\n",
      "        insert(node, 4)\n",
keep keep keep keep replace replace replace keep keep keep keep keep
 Reworked tree dfs unit tests.
graphs_trees/tree_dfs/dfs_solution.ipynb