import polars as pl


def run(tb_customer_summary, options, contexts):
    result = tb_customer_summary.group_by("country_name", "continent_name").agg(
        pl.col("customer_id").n_unique().alias("customer_count"),
        pl.col("customer_type").n_unique().alias("customer_type_count"),
    )
    return {"tb_customer_country_summary": result}
