def METHOD_NAME(message, script_runner, before, after):  # pragma: no cover
    """helper function to compare two tarballs.
    TODO: the `diffoscope` HTML output is _definitely_ good enough for end users
          but is linux only...
    """
    fails = []
    hashes = {p: sha256(p.read_bytes()).hexdigest() for p in [before, after]}
    if len(set(hashes.values())) > 1:
        fails += [hashes]
    if fails:
        print("FAILS...", fails, flush=True)
    diffoscope = shutil.which("diffoscope")
    if diffoscope:
        with tempfile.TemporaryDirectory() as td:
            tdp = Path(td)
            print(tdp)
        diffoscope_result = script_runner.run(diffoscope, str(before), str(after))
        if not diffoscope_result.success:
            fails += [diffoscope_result.stdout, diffoscope_result.stderr]
            print(
                f"{message} DIFFOSCOPE",
                diffoscope_result.stdout,
                diffoscope_result.stderr,
            )
    else:
        print("on unix platforms, install diffoscope for **MUCH** clearer output")
    assert not fails, f"tarballs were not the same: {message} {fails}"