Write a Python function that parses a nested dictionary and outputs a dictionary summarizing metrics by user key.
Asked in the ETL 1 stage. The input may contain nested dictionaries and lists. Every dictionary with a user field represents a record; aggregate its other numeric fields into the result for that user. Ignore nonnumeric fields and the user field.
Implement summarize_by_user(data). Return a dictionary mapping each user value to a dictionary of summed metric values. Traverse all nested dictionaries and lists. Preserve metric names, and omit users with no numeric metrics.
user valueuser field must be ignoreddef summarize_by_user(data):