input: Write a function to delete a certain element from a linked list. The function should take the element to be deleted as an argument and modify the linked list accordingly. If the element to be deleted is not present in the linked list, the function should return without making any changes.
  
  ### Function:
  
  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
  
  
  ### Assertions:
  
  # Test cases and expected outputs
  assert deleteNode(LinkedList().from_list([1, 2, 3, 4, 5]), 3) == [1, 2, 4, 5]
  assert deleteNode(LinkedList().from_list([1, 2, 3, 4, 5]), 1) == [2, 3, 4, 5]
  assert deleteNode(LinkedList().from_list([1, 2, 3, 4, 5]), 5) == [1, 2, 3, 4]
  assert deleteNode(LinkedList().from_list([1, 2, 3, 4, 5]), 6) == [1, 2, 3, 4, 5]
  assert deleteNode(LinkedList().from_list([]), 1) == []
  
output: def deleteNode(self, node):
      temp = self.head
      if temp is not None and temp.val == node:
          self.head = temp.next
          temp = None
          return
      while temp is not None:
          if temp.val == node:
              break
          prev = temp
          temp = temp.next
      if temp == None:
          return
      prev.next = temp.next
      temp = None