NumPy allowed · plain Python earns 10 bonus points
Convert deeply nested JSON dictionaries into flat dot-delimited key-value maps for serialization and tabular export.
Implement flatten_dict(nested, sep="."): recursively traverse nested, constructing keys by concatenating path segments with sep. Return a flat dictionary mapping leaf values to full dotted path strings. Empty sub-dictionaries map to {}.
flatten_dict(nested: dict, sep: str = ".") -> dict