input: Write a function that takes a Huffman tree and removes all its leaf nodes. If the node is not a leaf, it should recursively remove the leaf nodes from its left and right subtrees. If the node is a leaf, it should return None. If the input tree is empty, the function should return None.
  
  Example:
  
          (1)
        /       \
      (2)       (3)
      / \       / \
    (4) (5)   (6) (7)
  
  After removing the leaf nodes the tree should look like:
  
        (1)
        / \
       (2) (3)
  
  
  
  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) is None
  assert dropLeafNodes(Tree(1, None, Tree(2, None, None))) is None
  assert dropLeafNodes(Tree(1, Tree(2, Tree(4, None, None), Tree(5, None, None)), Tree(3, Tree(6, None, None), Tree(7, None, None)))) == Tree(1, Tree(2, None, None), Tree(3, None, None))
output: 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