     "source": [
      "class MyLinkedList(LinkedList):\n",
      "\n",
      "    def delete_node(self, node):\n",
      "        if self.head is None:\n",
      "            return\n",
      "        if node is None:\n",
      "            return\n",
      "        if node.next is None:\n",
      "            node.data = None\n",
 
</s> remove     "        if node is None:\n",
 </s> add     "        if self.head == node:\n",
    "            self.head = None\n", </s> remove     "        linked_list.delete_node(node2)\n",
    "        assert_equal(linked_list.get_all_data(), [1, 3, 1])\n",
 </s> add     "        linked_list.delete_node(node0)\n",
    "        assert_equal(linked_list.get_all_data(), [1, 4, 3, None])\n", </s> remove     "        node0 = linked_list.insert_to_front(1)\n",
 </s> add     "        node0 = linked_list.insert_to_front(2)\n",
    "        node1 = linked_list.insert_to_front(3)\n",
    "        node2 = linked_list.insert_to_front(4)\n",
    "        node3 = linked_list.insert_to_front(1)\n",
    "        linked_list.delete_node(node1)\n",
    "        assert_equal(linked_list.get_all_data(), [1, 4, 2])\n",
    "\n",
    "        print('Test: Multiple nodes, delete last element')\n",
    "        linked_list = MyLinkedList(None)\n",
    "        node0 = linked_list.insert_to_front(2)\n", </s> remove     "        assert_equal(linked_list.get_all_data(), [None])\n",
 </s> add     "        assert_equal(linked_list.get_all_data(), [])\n",
    "        if self.head is None or node is None:\n",
     "source": [
      "class MyLinkedList(LinkedList):\n",
      "\n",
      "    def delete_node(self, node):\n",
    "        if self.head is None or node is None:\n",
      "            return\n",
      "        if node is None:\n",
      "            return\n",
      "        if node.next is None:\n",
      "            node.data = None\n",
keep keep keep keep replace keep keep keep keep keep
 Polish delete mid node challenge and solution

Update edge cases and tests. 
linked_lists/delete_mid/delete_mid_solution.ipynb