input: Write a function to implement a Python function that takes a Huffman tree and drops all its leaf nodes. The function should return the modified tree without the leaf nodes.
  
  def dropLeafNodes(head): 
      
      # If node is not None and doesn't have any children 
      if head and not head.left and not head.right: 
          return None
    
      # Don't change anything if head is None 
      if not head: 
          return None
    
      # Recursively call dropLeafNodes on left and right subtrees
      head.left = dropLeafNodes(head.left) 
      head.right = dropLeafNodes(head.right) 
    
      # Return head of the modified tree
      return head
  
  assert dropLeafNodes(
      (None, (
          (None, (None, None)), 
          (None, (None, None))
      ))
  )==
      (None, (None, None))
  
  assert dropLeafNodes(
      (None, (
          (None, (
              (None, (None, None)), 
              (None, (None, None))
          )), None
      ))
  )==
      (None, ((None, (None, None)), None))
  
  assert dropLeafNodes(None)==None
  assert dropLeafNodes(
      (None, (
          (None, (None, None)),
          (None, (None, None))
      ))
  )==
      ((None, (None, None)), (None, (None, None)))
output: def dropLeafNodes(head): 
      
      # If node is not None and doesn't have any children 
      if head and not head[1] and not head[2]: 
          return None
    
      # Don't change anything if head is None 
      if not head: 
          return None
    
      # Recursively call dropLeafNodes on left and right subtrees
      head = (head[0], dropLeafNodes(head[1]), dropLeafNodes(head[2]))
    
      # Return head of the modified tree
      return head