input: from typing import List, Optional
  
  class Node:
      def __init__(self, value, left=None, right=None):
          self.value = value
          self.left = left
          self.right = right
  
  def dropLeafNodes(head: Optional[Node]) -> Optional[Node]: 
      """Removes all leaf nodes from a given Huffman tree.
      >>> dropLeafNodes(Node(1, Node(2, Node(4), Node(5)), Node(3, Node(6), Node(7))))
      <__main__.Node object at 0x...>  # Node structure with values {1, 2, 3, None, None, None, None}
      """
      
      # 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