input: 
  def dropLeafNodes(head):
      """
      Given a Huffman tree, this function removes all its leaf nodes.
      The function returns the root of the tree after all leaf nodes have been removed.
      
      >>> head = HuffmanNode()
      >>> head.left = HuffmanNode()
      >>> head.right = HuffmanNode()
      >>> dropLeafNodes(head) is None
      False
      >>> dropLeafNodes(head).left is None
      True
      >>> dropLeafNodes(head).right is None
      True
      """
      
      # 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 node has only one child, return the child
      if head.left is None:
          return head.right
      if head.right is None:
          return head.left
      
      # If the node has two children, return the node itself
      return head