code: def _setup_agent(monkeypatch, pop_func):
      monkeypatch.setattr(
          "wandb.sdk.launch.agent.LaunchAgent.pop_from_queue", pop_func
      )
  
      monkeypatch.setattr(
          "wandb.init",
          lambda project, entity, settings, id, job_type: None,
      )
  
      monkeypatch.setattr(
          "wandb.sdk.internal.internal_api.Api.create_launch_agent",
          lambda c, e, p, q, a, v, g: {
              "launchAgentId": "mock_agent_id"
          },
      )
  
imports: import json
  from unittest.mock import Mock
  import pytest
  import wandb
  from wandb.cli import cli
  from wandb.sdk.launch.errors import LaunchError
label_desc: Use image node_id 7 for calling a global function with example usage: _setup_agent(monkeypatch, pop_func) without return types