input: def dropLeafNodes(head): 
      """
      The function takes a Huffman tree and drops all its leaf nodes. The function
      operates recursively by calling itself on the left and the right subtrees of the
      given node, effectively removing any leaf nodes along the way.
      
      >>> dropLeafNodes(head)
      (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