input: def dropLeafNodes(head): 
      """
      Implement a function in Python that takes a Huffman tree and drops all its leaf nodes.
      A leaf node is a node that doesn't have any children.
      >>> dropLeafNodes((1)
                     /      \
                    (2)      (3)
                    / \      / \
                   (4) (5)  (6) (7))
      (1)
        /       \
      (2)       (3)
      """
  
      # 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
output:     return head