A farm shop's till sends a new file every few days. Each file lists sales records: the day number and the amount of one sale. A day can have many sales, and because the files overlap, one day's sales can be spread across several files.
The owner wants the trend: the total sales of each day, smoothed with a rolling average.
Task: write daily_trend(files, window).
files is a list of tables. Each table is a dictionary of two lists, "day" (whole numbers) and "sales". Every table has at least one row.window days, in day order.[day, average] pairs, one for each day where the window is full, in day order. day is the last day in the window, as an int. average is a float rounded to 1 decimal place.window, return an empty list.