code: def mock_agent(monkeypatch):
      monkeypatch.setattr(
          "wandb.sdk.launch._launch.LaunchAgent",
          lambda *args, **kwargs: MockAgent,
      )
  
file_path: wandb/tests/pytest_tests/unit_tests/test_launch/test_agent/test_config.py
imports: from unittest.mock import MagicMock
  import pytest
  from wandb.sdk.launch._launch import create_and_run_agent
  from wandb.sdk.launch.errors import LaunchError
label_desc: Use image node_id 1 for calling a global function with example usage: mock_agent(monkeypatch) without return types