input: Write a function to delete a node from a linked list. If the node to be deleted is the head node, the function should update the head to point to the next node. If the node is not present in the list, the function should do nothing.
  
  def deleteNode(self, node):
      if not self.head:
          return
      
      if self.head == node:
          self.head = self.head.next
          return
      
      current = self.head
      while current and current.next != node:
          current = current.next
      
      if current.next:
          current.next = current.next.next
  
  assert deleteNode(LinkedList([1, 2, 3, 4]), Node(3)) == [1, 2, 4]
  assert deleteNode(LinkedList([1, 2, 3, 4]), Node(1)) == [2, 3, 4]
  assert deleteNode(LinkedList([1, 2, 3, 4]), Node(4)) == [1, 2, 3]
  assert deleteNode(LinkedList([1, 2, 3, 4]), Node(5)) == [1, 2, 3, 4]
  assert deleteNode(LinkedList([]), Node(1)) == []
output: def deleteNode(self, node):
      if not self.head:
          return
      
      if self.head == node:
          self.head = self.head.next
          return
      
      current = self.head
      while current and current.next != node:
          current = current.next
      
      if current.next:
          current.next = current.next.next