input: Write a function to delete a certain node from a linked list. The function should take the node to be deleted as an input parameter and modify the linked list accordingly.
  
  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
  
  assert linkedList.deleteNode(nodeToDelete) == expectedOutcome
  assert linkedList.deleteNode(anotherNodeToDelete) == anotherExpectedOutcome
output: def deleteNode(self, node):
      if node.next is not None:
          node.data = node.next.data
          node.next = node.next.next
      else:
          temp = self.head
          while temp.next != node:
              temp = temp.next
          temp.next = None