code: def test_resolve_agent_config(monkeypatch, runner):
      monkeypatch.setattr(
          "wandb.sdk.launch._launch.LAUNCH_CONFIG_FILE",
          "./config/wandb/launch-config.yaml",
      )
      monkeypatch.setenv("WANDB_ENTITY", "diffentity")
      with runner.isolated_filesystem():
          os.makedirs("./config/wandb")
          with open("./config/wandb/launch-config.yaml", "w") as f:
              yaml.dump(
                  {
                      "entity": "different-entity",
                      "max_jobs": 2,
                      "registry": {"url": "test"},
                  },
                  f,
              )
          config, returned_api = _launch.resolve_agent_config(
              None, None, -1, ["diff-queue"], None
          )
  
          assert config["registry"] == {"url": "test"}
          assert config["entity"] == "diffentity"
          assert config["max_jobs"] == -1
          assert config.get("project") == LAUNCH_DEFAULT_PROJECT
  
imports: import json
  import multiprocessing.pool
  import os
  import sys
  from unittest import mock
  from unittest.mock import MagicMock
  import pytest
  import wandb
  import wandb.sdk.launch._launch
  import wandb.sdk.launch._project_spec
  import yaml
  from wandb.apis import PublicApi
  from wandb.sdk.launch.agent.agent import LaunchAgent
  from wandb.sdk.launch.builder.build import _inject_wandb_config_env_vars
  from wandb.sdk.launch.builder.docker_builder import DockerBuilder
  from wandb.sdk.launch.errors import LaunchError
  from wandb.sdk.launch.utils import LAUNCH_DEFAULT_PROJECT, PROJECT_SYNCHRONOUS, pull_docker_image
  from wandb.sdk.lib import runid
  from tests.pytest_tests.unit_tests_old.utils import fixture_open, notebook_path
label_desc: Use image node_id 33 for calling a global function with example usage: test_resolve_agent_config(monkeypatch, runner) without return types