code: def test_max_scheduler_setup(mocker, num_schedulers, clean_agent):
      _setup(mocker)
      mock_config = {
          "entity": "test-entity",
          "project": "test-project",
          "max_schedulers": num_schedulers,
      }
      agent = LaunchAgent(api=mocker.api, config=mock_config)
  
      if num_schedulers is None:
          num_schedulers = 1  # default for none
      elif num_schedulers == -1:
          num_schedulers = float("inf")
      elif isinstance(num_schedulers, str):
          num_schedulers = int(num_schedulers)
  
      assert agent._max_schedulers == num_schedulers
  
file_path: wandb/tests/pytest_tests/unit_tests/test_launch/test_agent/test_agent.py
imports: import asyncio
  import threading
  from unittest.mock import MagicMock
  import pytest
  from wandb.errors import CommError
  from wandb.sdk.launch.agent.agent import JobAndRunStatusTracker, LaunchAgent
  from wandb.sdk.launch.errors import LaunchDockerError, LaunchError
label_desc: Use image node_id 6 for calling a global function with example usage: test_max_scheduler_setup(mocker, num_schedulers, clean_agent) without return types