input: Write a function to drop all leaf nodes from a given Huffman tree. The function should return the modified tree without its leaf nodes. If the tree is empty, the function should return None.
  assert dropLeafNodes([1, [2, [4], [5]], [3, [6], [7]]]) == [1, [2], [3]]
  assert dropLeafNodes([1, [2], [3]]) == [1]
  assert dropLeafNodes([1]) == None
  assert dropLeafNodes([]) == None
output: def dropLeafNodes(tree):
      if not tree:
          return None
      if isinstance(tree, list):
          if len(tree) == 2 and isinstance(tree[1], list):
              return [tree[0], dropLeafNodes(tree[1])]
          elif len(tree) == 3 and isinstance(tree[1], list) and isinstance(tree[2], list):
              left = dropLeafNodes(tree[1])
              right = dropLeafNodes(tree[2])
              if left is None and right is None:
                  return None
              elif left is None:
                  return [tree[0], right]
              elif right is None:
                  return [tree[0], left]
              else:
                  return [tree[0], left, right]
          else:
              return None
      else:
          return None