def METHOD_NAME(base_mod, ref_mods, base_type, ref_types, cls=None):
    all_types = ["Name"] + [base_type] + ref_types
    header = ", ".join("**{}**".format(t) for t in all_types)
    header = "   {}".format(header)
    rows = []
    counters_funcs = []
    totals = []
    totals_, counters_funcs_ = generate_totals_numbers(
        "Module-Level", base_mod, ref_mods
    )
    totals.append(totals_)
    counters_funcs.append(counters_funcs_)
    cells = ", ".join(str(t) for t in totals)
    total = "   {}".format(cells)
    rows.append(total)
    totals = []
    totals_, counters_funcs_ = generate_totals_numbers(
        "Multi-Dimensional Array", base_mod, ref_mods, cls="ndarray"
    )
    totals.append(totals_)
    counters_funcs.append(counters_funcs_)
    cells = ", ".join(str(t) for t in totals)
    total = "   {}".format(cells)
    rows.append(total)
    totals = []
    totals_, counters_funcs_ = generate_totals_numbers(
        "Linear Algebra",
        base_mod + ".linalg",
        [m + ".linalg" for m in ref_mods],
    )
    totals.append(totals_)
    counters_funcs.append(counters_funcs_)
    cells = ", ".join(str(t) for t in totals)
    total = "   {}".format(cells)
    rows.append(total)
    totals = []
    totals_, counters_funcs_ = generate_totals_numbers(
        "Discrete Fourier Transform",
        base_mod + ".fft",
        [m + ".fft" for m in ref_mods],
    )
    totals.append(totals_)
    counters_funcs.append(counters_funcs_)
    cells = ", ".join(str(t) for t in totals)
    total = "   {}".format(cells)
    rows.append(total)
    totals = []
    totals_, counters_funcs_ = generate_totals_numbers(
        "Random Sampling",
        base_mod + ".random",
        [m + ".random" for m in ref_mods],
    )
    totals.append(totals_)
    counters_funcs.append(counters_funcs_)
    cells = ", ".join(str(t) for t in totals)
    total = "   {}".format(cells)
    rows.append(total)
    counter_functions = []
    for i in range(len(counters_funcs[0])):
        counter = 0
        for j in range(len(counters_funcs)):
            counter += counters_funcs[j][i]
        counter_functions.append("{}".format(counter))
    summary = ["Total"] + counter_functions
    cells = ", ".join(str(t) for t in summary)
    summary_total = "   {}".format(cells)
    rows.append(summary_total)
    comparison_rst = [".. csv-table::", ""] + [header] + rows
    return ["Summary", "~" * len("Summary"), ""] + comparison_rst + [""]