input: 
  def dropLeafNodes(head):
      """Remove all leaf nodes from a given Huffman tree.
      
      >>> from collections import namedtuple
      >>> Node = namedtuple('Node', ['left', 'right'])
      >>> tree = Node(left=Node(left=4, right=5), right=Node(left=6, right=7))
      >>> dropLeafNodes(tree)
      Node(left=None, right=None)
      
      >>> tree = Node(left=None, right=None)
      >>> dropLeafNodes(tree)
      None
      """
      if head and not head.left and not head.right:
          return None
      
      if not head:
          return None
      
      head.left = dropLeafNodes(head.left)
      head.right = dropLeafNodes(head.right)
      
      return head
  
output:     if not head.left and not head.right:
          return None