code: def test_git_root(runner, relay_server, wandb_init):
      path = "./foo"
      remote_url = "https://foo:@github.com/FooTest/Foo.git"
      with runner.isolated_filesystem():
          with git.Repo.init(path) as repo:
              repo.create_remote("origin", remote_url)
              repo.index.commit("initial commit")
          with relay_server() as relay:
              with mock.patch.dict(os.environ, {env.GIT_ROOT: path}):
                  run = wandb_init()
                  run.finish()
              run_attrs = relay.context.get_run_attrs(run.id)
              assert run_attrs.remote == repo.remote().url
              assert run_attrs.commit == repo.head.commit.hexsha
  
file_path: wandb/tests/pytest_tests/system_tests/test_core/test_wandb_settings.py
imports: import os
  import platform
  from unittest import mock
  import git
  import pytest
  from wandb import env
  from wandb.sdk import wandb_settings
label_desc: Use image node_id 11 for calling a global function with example usage: test_git_root(runner, relay_server, wandb_init) without return types