def METHOD_NAME(version, output_format, data_archive_readonly, cli_runner):
    archive_paths = {
        0: Path("upgrade") / "v0" / "points0.snow.tgz",
        1: Path("upgrade") / "v1" / "points.tgz",
        2: Path("upgrade") / "v2.kart" / "points.tgz",
        3: Path("points.tgz"),
    }
    branding = {0: "sno", 1: "sno", 2: "kart", 3: "kart"}[version]
    with data_archive_readonly(archive_paths[version]):
        r = cli_runner.invoke(["data", "version", "-o", output_format])
        assert r.exit_code == 0, r
        if output_format == "text":
            assert r.stdout.splitlines()[0].endswith(str(version))
        else:
            output = json.loads(r.stdout)
            assert output == {
                "repostructure.version": version,
                "localconfig.branding": branding,
            }