code: def test_sweep_construct_scheduler_args():
      assert not utils.construct_scheduler_args({}, "queue", "project")
  
      args = utils.construct_scheduler_args(
          {"job": "job:12315"}, "queue", "project"
      )
      assert args == [
          "--queue",
          "'queue'",
          "--project",
          "'project'",
          "--job",
          "'job:12315'",
      ]
  
      args = utils.construct_scheduler_args(
          {"job": "job:12315"},
          "queue",
          "project",
          return_job=False,
      )
      assert args == [
          "--queue",
          "'queue'",
          "--project",
          "'project'",
          "--job",
          "'job:12315'",
      ]
  
      args = utils.construct_scheduler_args(
          {"job": "job:latest"},
          "queue",
          "project",
          author="author",
          return_job=False,
      )
      assert args == [
          "--queue",
          "'queue'",
          "--project",
          "'project'",
          "--author",
          "'author'",
          "--job",
          "'job:latest'",
      ]
  
      args = utils.construct_scheduler_args(
          {"image_uri": "image_uri"},
          "queue",
          "project",
          return_job=False,
      )
      assert args == [
          "--queue",
          "'queue'",
          "--project",
          "'project'",
          "--image_uri",
          "image_uri",
      ]
  
      # should fail because job and image_uri are mutually exclusive
      assert not (
          utils.construct_scheduler_args(
              {"job": "job:111", "image_uri": "image_uri"},
              "queue",
              "project",
              return_job=False,
          )
      )
  
file_path: wandb/tests/pytest_tests/system_tests/test_sweep/test_sweep_utils.py
imports: import json
  import pytest
  import yaml
  from wandb.sdk.launch.sweeps import utils
label_desc: Use image node_id 4 for calling a global function with example usage: test_sweep_construct_scheduler_args() without return types