def METHOD_NAME(shard, text, should_print, s=[0, 0, 0, 0, 0, 0], divs=[]):
    m = P_SUM.findall(text)
    if not m:
        sys.stderr.write("Failed to parse shard %s stdout for summary" % shard)
        return
    for test in m:
        if int(test[-1]) == 1:
            divs.append(shard)
        for i in range(len(s)):
            s[i] += int(test[i])
    if should_print:
        print(
            "Tests: %d Success: %d (Rerun: %d) Skipped: %d Timeout: %d "
            "Divergences: %d (failing shards: %s)    \r" %
            tuple(s + [", ".join(divs) if divs else "none"]),
            end="")
    return s