code: def test_launch_sweep_scheduler_macro_args(
      user, monkeypatch, command
  ):
      _patch_wandb_run(monkeypatch)
  
      async def mock_launch_add(*args, **kwargs):
          mock = Mock(spec=public.QueuedRun)
          mock.args = Mock(return_value=args)
          return mock
  
      monkeypatch.setattr(
          "wandb.sdk.launch._launch_add._launch_add",
          mock_launch_add,
      )
  
      sweep_config = {
          "job": "job:latest",
          "program": "program-override.py",
          "method": "grid",
          "parameters": {
              "foo-1": {"values": [1, 2]},
              "bool_2": {"values": [True, False]},
          },
          "command": command,
      }
      # Entity, project, and sweep should be everything you need to create a scheduler
      api = internal.Api()
      s = wandb.sweep(sweep_config, entity=user, project="t")
      scheduler = SweepScheduler(
          api,
          sweep_id=s,
          entity=user,
          project="t",
          queue="q",
          num_workers=1,
      )
      asyncio.run(scheduler._register_agents())
      srun2 = scheduler._get_next_sweep_run(0)
      scheduler._add_to_launch_queue(srun2)
  
imports: import asyncio
  from typing import Dict
  from unittest.mock import Mock, patch
  import pytest
  import wandb
  from wandb.apis import internal, public
  from wandb.errors import CommError
  from wandb.sdk.launch.sweeps import SchedulerError, load_scheduler
  from wandb.sdk.launch.sweeps.scheduler import RunState, Scheduler, SchedulerState, SweepRun
  from wandb.sdk.launch.sweeps.scheduler_sweep import SweepScheduler
  from wandb.sdk.launch.sweeps.utils import construct_scheduler_args
  from .test_wandb_sweep import VALID_SWEEP_CONFIGS_MINIMAL
label_desc: Use image node_id 18 for calling a global function with example usage: test_launch_sweep_scheduler_macro_args(user, monkeypatch, command) and returns: mock