def METHOD_NAME(data):
    """Calculate line hit rates from raw coverage data"""
    result = {}
    total_lines = 0
    total_hits = 0
    log("Counting line rates:")
    for item in data:
        lines = len(data[item])
        hits = sum(1 for x in data[item].values() if x)
        result[item] = 1.0 * hits / lines
        log(f" * {item} = {result[item]} ({hits} / {lines})")
        total_lines += lines
        total_hits += hits
    result["_"] = 1.0 * total_hits / total_lines
    result["_hits"] = total_hits
    result["_lines"] = total_lines
    return result