input: def dropLeafNodes(head):
      """Remove all leaf nodes from a given Huffman tree and return the modified tree.
      >>> dropLeafNodes(None)
      None
      >>> dropLeafNodes(Tree(1, Tree(2, Tree(4), Tree(5)), Tree(3, Tree(6), Tree(7))))
      Tree(1, Tree(2), Tree(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:     # 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