input: def dropLeafNodes(head): 
      """
      This function takes a Huffman tree and drops all its leaf nodes.
      A leaf node is defined as a node that doesn't have any children.
      
      >>> # Example Huffman tree:
      >>> #       (1)
      >>> #      /   \
      >>> #    (2)   (3)
      >>> #    / \   / \
      >>> #  (4) (5)(6) (7)
      >>> class Node:
      ...     def __init__(self, value, left=None, right=None):
      ...         self.value = value
      ...         self.left = left
      ...         self.right = right
      ... 
      >>> root = Node(1, Node(2, Node(4), Node(5)), Node(3, Node(6), Node(7)))
      >>> modified_tree = dropLeafNodes(root)
      >>> modified_tree.value
      1
      >>> modified_tree.left.value
      2
      >>> modified_tree.right.value
      3
      >>> modified_tree.left.left is None
      True
      >>> modified_tree.left.right is None
      True
      >>> modified_tree.right.left is None
      True
      >>> modified_tree.right.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 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