flatten(data, prefix='') turning {'a': {'b': 1}, 'c': 2} into {'a.b': 1, 'c': 2} recursively — nested dicts extend the key path with dots; every non-dict value lands as a leaf.flatten({'a': {'b': 1, 'c': {'d': 2}}, 'e': 3}){'a.b': 1, 'a.c.d': 2, 'e': 3}Paths accumulate through recursion.
Build the child prefix as f"{prefix}{key}." when descending.
Merge child results with update().