code: def test_launch_agent_base(
      runner,
      test_settings,
      live_mock_server,
      mocked_fetchable_git_repo,
      kill_agent_on_update_job,
      monkeypatch,
  ):
      monkeypatch.setattr(
          wandb.sdk.launch.utils,
          "LAUNCH_CONFIG_FILE",
          os.path.join("./config/wandb/launch-config.yaml"),
      )
      launch_config = {
          "builder": {"type": "docker"},
          "registry": {"url": "test"},
      }
  
      with runner.isolated_filesystem():
          os.makedirs(os.path.expanduser("./config/wandb"))
          with open(
              os.path.expanduser("./config/wandb/launch-config.yaml"),
              "w",
          ) as f:
              json.dump(launch_config, f)
          result = runner.invoke(cli.launch_agent, "test_project")
          ctx = live_mock_server.get_ctx()
          assert ctx["num_popped"] == 1
          assert ctx["num_acked"] == 1
          assert len(ctx["launch_agents"].keys()) == 1
          assert ctx["run_queues_return_default"] is True
          assert "Shutting down, active jobs" in result.output
          assert "polling on project" in result.output
  
imports: import json
  import os
  from unittest.mock import Mock
  import pytest
  import wandb
  from wandb.apis import public
  from wandb.cli import cli
  from .test_launch import mock_load_backend, mocked_fetchable_git_repo
label_desc: Use image node_id 4 for calling a global function with example usage: test_launch_agent_base(runner, test_settings, live_mock_server, mocked_fetchable_git_repo, kill_agent_on_update_job, monkeypatch) without return types