input: Write a function to delete a certain element from a linked list. The function should search for the node to be deleted, unlink it from the linked list, and handle the case where the node to be deleted is the head node. If the node is not found in the linked list, the function should return without making any changes to the list.
  
  def deleteNode(self, node):
      temp = self.head
      if temp is not None and temp == node:
          self.head = temp.next
          temp = None
          return
      
      while temp is not None:
          if temp == node:
              break
          prev = temp
          temp = temp.next
      
      if temp == None:
          return
      
      prev.next = temp.next
      temp = None
  
  # Test cases
  assert deleteNode(linked_list, node_to_delete) == expected_output
  assert deleteNode(linked_list, node_to_delete) == expected_output
  assert deleteNode(linked_list, node_to_delete) == expected_output
  assert deleteNode(linked_list, node_to_delete) == expected_output
  assert deleteNode(linked_list, node_to_delete) == expected_output
output: def deleteNode(self, node):
      temp = self.head
      if temp is not None and temp == node:
          self.head = temp.next
          temp = None
          return
      
      while temp is not None:
          if temp == node:
              break
          prev = temp
          temp = temp.next
      
      if temp == None:
          return
      
      prev.next = temp.next
      temp = None