def METHOD_NAME(library_key, library_source_count):
    """
    Generate a C++ library.
    The library has library_source_count+1 distinct functions.  One
    function is always present and is named for the library.  It calls
    all of the remaining functions in the library.
    Args:
        library_key: determines the name of the C++ library
        library_source_count: determines how many source files the library will have
    """
    library_source_index = 0
    cc_labels = []
    hh_files = []
    funcnames = []
    for library_source_index in range(library_source_count):
        rulename_hh = "lib{}-{}_hh".format(library_key, library_source_index)
        filename_hh = "lib{}-{}.hh".format(library_key, library_source_index)
        rulename_cc = "lib{}-{}_cc".format(library_key, library_source_index)
        filename_cc = "lib{}-{}.cc".format(library_key, library_source_index)
        funcname = "func_{}_{}".format(id(library_key), library_source_index)
        cc_labels.append(rulename_cc)
        cc_labels.append(rulename_hh)
        hh_files.append(filename_hh)
        funcnames.append(funcname)
        lines = []
        lines.append("#include <iostream>")
        lines.append('#include "{}"'.format(filename_hh))
        lines.append("void {}(void)".format(funcname))
        lines.append("{")
        lines.append('    std::cout << "Hello, World! {} {}" << std::endl;'.format(library_key, library_source_index))
        lines.append("}")
        write_file(
            name = rulename_cc,
            out = filename_cc,
            lines = lines,
        )
        lines = []
        lines.append("extern void {}(void);".format(funcname))
        write_file(
            name = rulename_hh,
            out = filename_hh,
            lines = lines,
        )
        library_source_index += 1
    rulename_hh = "lib{}_hh".format(library_key)
    filename_hh = many_cc_library_header(library_key)
    rulename_cc = "lib{}_cc".format(library_key)
    filename_cc = "lib{}.cc".format(library_key)
    funcname = many_cc_library_function(library_key)
    lines = []
    lines.extend(['#include "{}"'.format(x) for x in hh_files])
    lines.append('#include "{}"'.format(filename_hh))
    lines.append("void {}(void)".format(funcname))
    lines.append("{")
    lines.extend(["    {}();".format(x) for x in funcnames])
    lines.append("}")
    write_file(
        name = rulename_cc,
        out = filename_cc,
        lines = lines,
    )
    lines = []
    lines.append("extern void {}(void);".format(funcname))
    write_file(
        name = rulename_hh,
        out = filename_hh,
        lines = lines,
    )
    cc_library(
        name = many_cc_library_label(library_key),
        srcs = cc_labels + [rulename_cc],
        hdrs = [rulename_hh],
    )