def METHOD_NAME(
    df: pd.DataFrame,
    mass_cols: List[str],
    fuel_emission_factors: Dict[str, float],
    heat_rate_col: str = None,
) -> pd.DataFrame:
    """Convert costs per tonne of CO2 to a MWh basis
    Parameters
    ----------
    df : pd.DataFrame
        Generators dataframe with a fuel column, a heat rate column, and the columns
        provided in the list `mass_cols`
    mass_cols : List[str]
        Names of columns with cost per tonne of CO2 disposal
    fuel_emission_factors : Dict[str, float]
        Emission rate of tonne per unit of energy for fuels used by CCS generators
    heat_rate_col : str, optional
        Name of the column with generator heat rates, by default None
    Returns
    -------
    pd.DataFrame
        Modified copy of the input, with the new column "co2_cost_mwh"
    """
    if not heat_rate_col:
        heat_rate_cols = [
            c for c in df.columns if "heat_rate" in c.lower() and "per_mwh" in c.lower()
        ]
        if len(heat_rate_cols) > 1:
            logger.warning(
                "More than one column with 'heat_rate' and 'per_mwh' was found when "
                "converting CO2 transport costs from per tonne to per MWh. Values are "
                "not being converted."
            )
            return df
        elif not heat_rate_cols:
            logger.warning(
                "Unable to identify a heat rate column when converting CO2 transport costs "
                "from per tonne to per MWh. A heat rate column should contain 'heat_rate' and "
                "'per_mwh' (capitalization does not matter). Values are not being converted."
            )
            return df
        else:
            heat_rate_col = heat_rate_cols[0]
    fuel_col = [c for c in df.columns if c.lower() == "fuel"]
    fuel_col = fuel_col[0]
    for fuel, ef in fuel_emission_factors.items():
        df.loc[
            df[fuel_col].str.contains(fuel, case=False), "tonne_co2_captured_mwh"
        ] = (
            df.loc[df[fuel_col].str.contains(fuel, case=False), heat_rate_col]
            * ef
            * (
                df.loc[df[fuel_col].str.contains(fuel, case=False), "capture_rate"]
                / 100
            )
        )
    df.loc[:, "co2_cost_mwh"] = df[mass_cols].sum(axis=1) * df["tonne_co2_captured_mwh"]
    df.loc[:, "co2_cost_mwh"] = df.loc[:, "co2_cost_mwh"].fillna(0)
    return df