input: Write a function to delete a certain node from a linked list. The function should take a node as input and remove it from the linked list. If the node is not found in the list, the function should not alter the list. If the node to be deleted is the head of the list, the head should be updated to be the next node.
  
  
  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 self.head == node:
              self.head = node.next
              return
  
          current = self.head
          while current and current.next != node:
              current = current.next
  
          if current is None:
              return
  
          current.next = node.next
  
  
  assert deleteNode(linked_list.head) is None
  assert deleteNode(linked_list.head.next) is None
  assert deleteNode(linked_list.head.next.next) is None
  assert deleteNode(linked_list.head.next.next.next) is None
  assert deleteNode(None) is None
output: def deleteNode(self, node):
      if self.head == node:
          self.head = node.next
          return
  
      current = self.head
      while current and current.next != node:
          current = current.next
  
      if current is None:
          return
  
      current.next = node.next