code: def test_restore_no_remote(
      runner, mock_server, git_repo, docker, monkeypatch
  ):
      # TODO(jhr): does not work with --flake-finder
      with open("patch.txt", "w") as f:
          f.write("test")
      git_repo.repo.index.add(["patch.txt"])
      git_repo.repo.commit()
      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
      assert "Applied patch" in result.output
      assert "Restored config variables to " in result.output
      assert "Launching docker container" in result.output
      docker.assert_called_with(
          [
              "docker",
              "run",
              "-e",
              "LANG=C.UTF-8",
              "-e",
              "WANDB_DOCKER=wandb/deepo@sha256:abc123",
              "--ipc=host",
              "-v",
              wandb.docker.entrypoint + ":/wandb-entrypoint.sh",
              "--entrypoint",
              "/wandb-entrypoint.sh",
              "-v",
              os.getcwd() + ":/app",
              "-w",
              "/app",
              "-e",
              "WANDB_API_KEY=test",
              "-e",
              "WANDB_COMMAND=python train.py --test foo",
              "-it",
              "test/docker",
              "/bin/bash",
          ]
      )
  
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 2 for calling a global function with example usage: test_restore_no_remote(runner, mock_server, git_repo, docker, monkeypatch) without return types