def METHOD_NAME(coverage: str, generator: str):
    if coverage == "gcov" and generator != "gcovr":
        clean("coverage.info")
        run(
            [
                "lcov",
                "--capture",
                "--directory",
                ".",
                "--output-file",
                "coverage.info",
                "--ignore-errors",
                "source",
            ]
        )
    elif coverage == "gcov" and generator == "gcovr":
        pass
    elif coverage == "clang":
        clean("coverage.profdata")
        run(
            [
                "llvm-profdata",
                "merge",
                "-sparse",
                "default.profraw",
                "-o",
                "coverage.profdata",
            ]
        )
    else:
        die("Can't prepare profiling data of unknown type (%s)." % coverage)