input: 
  def dropLeafNodes(head): 
      """ Given a Huffman tree, this function drops all its leaf nodes.
      >>> from collections import namedtuple
      >>> Node = namedtuple('Node', ['left', 'right'])
      >>> head = Node(left=Node(left=None, right=None), right=Node(left=None, right=None))
      >>> 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
  
output:     
      # If the current node is a leaf node, return None
      if head.left is None and head.right is None:
          return None
  