def filter_pre_post_table(
    combi_table,
    focus_countries,
    reg_var="coordinator_country",
    focus_var="project_lq",
    volume_var="project_total",
):
    """Filters an activity table to focus on particular variables and countries"""

    combined_table_focus = combi_table.loc[
        combi_table[reg_var].isin(focus_countries)
    ].query(f"variable=='{focus_var}'")

    size_lookup = combi_table.query(f"variable=='{volume_var}'")[
        [reg_var, "cluster_covid", "value"]
    ].rename(columns={"value": "volume"})

    combined_table_focus = combined_table_focus.merge(
        size_lookup, on=[reg_var, "cluster_covid"]
    )

    return combined_table_focus