An online tea shop wants a grid of how many orders came from each region for each product. Orders only store a customer number, and the regions are in a separate customer list. Some orders come from guest customers who aren't in that list, and those orders must still be counted.
Task: write region_product_counts(orders, customers).
orders is a dictionary of two lists, "customer_id" and "product", one entry per order. There is at least one order.customers is a dictionary of two lists, "customer_id" and "region". Each customer number appears once. No region is called "Unknown".customers belongs to the region "Unknown".Return a dictionary with two keys:
"products": every product that was ordered, sorted alphabetically."rows": one list per region that has at least one order. Each list is [region, count for each product..., total], with the counts in the same order as "products" and total the region's number of orders. A region with no orders of a product has 0 there. All counts are ints.Sort the rows by total, biggest first. If two regions have the same total, put them in alphabetical order.