code: def test_restore_good_remote(
      runner, mock_server, git_repo, docker, monkeypatch
  ):
      # git_repo creates its own isolated filesystem
      git_repo.repo.create_remote("origin", "git@fake.git:foo/bar")
      monkeypatch.setattr(
          subprocess, "check_call", lambda command: True
      )
      mock_server.set_context(
          "git", {"repo": "http://fake.git/foo/bar"}
      )
      monkeypatch.setattr(cli, "_api", InternalApi({"project": "test"}))
      result = runner.invoke(cli.restore, ["wandb/test:abcdef"])
      print(result.output)
      print(traceback.print_tb(result.exc_info[2]))
      assert result.exit_code == 0
      assert "Created branch wandb/abcdef" in result.output
  
file_path: wandb/tests/pytest_tests/unit_tests_old/test_core/test_cli.py
imports: import os
  import platform
  import subprocess
  import traceback
  import pytest
  import wandb
  from wandb.apis.internal import InternalApi
  from wandb.cli import cli
label_desc: Use image node_id 4 for calling a global function with example usage: test_restore_good_remote(runner, mock_server, git_repo, docker, monkeypatch) without return types