def METHOD_NAME(git_repo, base_version, expected_version):
    latest_commit_hash = subprocess.run(
        ["git", "rev-parse", "HEAD"], stdout=subprocess.PIPE
    )
    create_or_update_version_file(base_version, git_repo / "version.json")
    with open(git_repo / "version.json") as f:
        version = json.loads(f.read())
    assert version == {
        "version": expected_version,
        "git_commit": latest_commit_hash.stdout.strip().decode(),
    }