NumPy allowed · plain Python earns 10 bonus points
Flatten an arbitrarily nested hierarchy of lists into a single flat list -- a foundational recursive pattern common in parsing hierarchical JSON responses and nested token structures.
Implement flatten_nested_list(nested): recursively traverse nested and return a flat list containing all leaf (non-list) elements in their original order. Empty lists should be ignored. Return an empty list if nested contains no leaf items.
flatten_nested_list(nested: list) -> list