input: Write a function to delete a certain node from a linked list. The function should be able to handle cases where the node to be deleted is the head node or any other node in the list. If the node to be deleted is not present in the list, the function should simply return without making any changes. The function should be implemented in a class method of a Linked List class.
  
  class Node:
      def __init__(self, data):
          self.data = data
          self.next = None
  
  class LinkedList:
      def __init__(self):
          self.head = None
  
      def deleteNode(self, node):
          temp = self.head
          if temp is not None:
              if 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 LinkedList().deleteNode(Node(1)) is None
output: def deleteNode(self, node):
      temp = self.head
      if temp is not None:
          if 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