You have a sales DataFrame with columns region, product and revenue, where a product can appear in many rows.
Implement top_products(df, n=2) returning a DataFrame with columns region, product and revenue:
n products per region by total revenue, breaking ties alphabetically by product;region, then by revenue from highest to lowest (then by product), with a fresh 0..k index.