input: Write a function to delete a certain node from a linked list. The function should take the node to be deleted as an argument and modify the linked list accordingly. If the node is the head of the list, update the head to the next node. If the node is not found in the list, do nothing. Return the modified linked list as a result.
  
  class Node:
      def __init__(self, data):
          self.data = data
          self.next = None
  
  class LinkedList:
      def __init__(self):
          self.head = None
  
      def deleteNode(self, node):
          if not self.head:
              return
          
          if self.head == node:
              self.head = self.head.next
              return
          
          current = self.head
          while current.next and current.next != node:
              current = current.next
          
          if current.next:
              current.next = current.next.next
  
  assert deleteNode(LinkedList().deleteNode(None))==None
  assert deleteNode(LinkedList().deleteNode(Node(1)))==None
  assert deleteNode(LinkedList().deleteNode(Node(2)))==None
  assert deleteNode(LinkedList().deleteNode(Node(3)))==None
  assert deleteNode(LinkedList().deleteNode(Node(4)))==None
  assert deleteNode(LinkedList().deleteNode(Node(5)))==None
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.next and current.next != node:
          current = current.next
      
      if current.next:
          current.next = current.next.next
  