def METHOD_NAME(
    self,
    name,
    srcs,
    deps=None,
    headers=None,
    extra_external_deps="",
    link_whole=False,
    external_dependencies=None,
    extra_test_libs=False,
):
    if headers is not None:
        headers = "[" + pretty_list(headers) + "]"
    with open(self.path, "ab") as targets_file:
        targets_file.write(
            targets_cfg.library_template.format(
                name=name,
                srcs=pretty_list(srcs),
                headers=headers,
                deps=pretty_list(deps),
                extra_external_deps=extra_external_deps,
                link_whole=link_whole,
                external_dependencies=pretty_list(external_dependencies),
                extra_test_libs=extra_test_libs,
            ).encode("utf-8")
        )
    self.total_lib = self.total_lib + 1