input: def dropLeafNodes(head): 
      """
      This function takes a Huffman tree and drops all its leaf nodes.
      
      >>> class TreeNode:
      ...     def __init__(self, x):
      ...         self.val = x
      ...         self.left = None
      ...         self.right = None
      >>> root = TreeNode(1)
      >>> root.left = TreeNode(2)
      >>> root.right = TreeNode(3)
      >>> root.left.left = TreeNode(4)
      >>> root.left.right = TreeNode(5)
      >>> root.right.left = TreeNode(6)
      >>> root.right.right = TreeNode(7)
      >>> dropLeafNodes(root)
      >>> print(f'Left child of node {root.val}: {root.left.val if root.left else "None"}')
      'Left child of node 1: 2'
      """
      
      # 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