def METHOD_NAME(df: pd.DataFrame, gas: str, countries_in_regions: Dict[str, List[str]]) -> catalog.Table:
    """Extract data for a particular gas and create a table with variables' metadata.
    Parameters
    ----------
    df : pd.DataFrame
    gas : str
        Name of gas to consider (as called in "gas" column of the original data).
    countries_in_regions : dict
        Countries in regions (a dictionary where each key is the name of the region, and the value is a list of country
        names in that region). This is used to avoid loading the list of countries in a region for each gas.
    Returns
    -------
    table_gas : catalog.Table
        Table with data for considered gas, and metadata for each variable.
    """
    # Select data for current gas.
    df_gas = df[df["gas"] == gas].drop(columns="gas").reset_index(drop=True)
    # Pivot table to have a column for each sector.
    df_gas = df_gas.pivot(index=["country", "year"], columns="sector", values="value").reset_index()
    # Create region aggregates.
    for region in REGIONS_TO_ADD:
        df_gas = geo.add_region_aggregates(
            df=df_gas,
            region=region,
            countries_in_region=countries_in_regions[region],
            countries_that_must_have_data=[],
            num_allowed_nans_per_year=None,
            frac_allowed_nans_per_year=0.2,
            aggregations=None,
            keep_original_region_with_suffix=" (CAIT)",
        )
    # Add population to data.
    df_gas = geo.add_population_to_dataframe(df=df_gas)
    # Add per capita variables.
    variables = [column for column in df_gas.columns if column not in ["country", "year", "population"]]
    for variable in variables:
        new_column = variable + PER_CAPITA_SUFFIX
        df_gas[new_column] = MT_TO_T * df_gas[variable] / df_gas["population"]
    # Remove columns that only have nans.
    df_gas = df_gas.drop(columns=df_gas.columns[df_gas.isnull().all()])
    # Remove rows that only have nans.
    df_gas = df_gas.dropna(
        subset=[column for column in df_gas.columns if column not in ["country", "year"]],
        how="all",
    ).reset_index(drop=True)
    # Set index and sort rows and columns conveniently.
    df_gas = df_gas.set_index(["country", "year"], verify_integrity=True).sort_index()
    df_gas = df_gas[sorted(df_gas.columns)]
    # Create table with this data but no metadata.
    table_gas = catalog.Table(df_gas)
    # Create variable metadata.
    for variable in table_gas.columns:
        if PER_CAPITA_SUFFIX in variable:
            table_gas[variable].metadata.unit = "tonnes per capita"
            table_gas[variable].metadata.short_unit = "t"
            table_gas[variable].metadata.title = variable
            table_gas[variable].metadata.display = {"name": variable.replace(PER_CAPITA_SUFFIX, "")}
        else:
            table_gas[variable].metadata.unit = "million tonnes"
            table_gas[variable].metadata.short_unit = "million t"
            table_gas[variable].metadata.title = variable
            table_gas[variable].metadata.display = {
                "name": variable,
                "numDecimalPlaces": 0,
            }
    return table_gas