def METHOD_NAME(fname):
    """Replace metrics class name.
    This temporary fix is needed due to compatibility issue with GATK
    4.1.2.0 and MultiQC 1.8. MultiQC searches for CollectWgsMetrics
    instead of WgsMetrics in the report file. Note that this should be
    resolved in the 1.9 release of MultiQC.
    """
    with open(fname, "r") as report:
        newlines = []
        for line in report.readlines():
            if line == "## METRICS CLASS\tpicard.analysis.WgsMetrics\n":
                line = "## METRICS CLASS\tCollectWgsMetrics$WgsMetrics\n"
                newlines.append(line)
            else:
                newlines.append(line)
    with open(fname, "w") as report:
        for line in newlines:
            report.writelines(line)