code: def test_launch_add_with_priority(
      runner, relay_server, user, monkeypatch
  ):
      def patched_push_to_run_queue_introspection(*args, **kwargs):
          args[0].server_supports_template_variables = True
          args[0].server_push_to_run_queue_supports_priority = True
          return (True, True)
  
      monkeypatch.setattr(
          wandb.sdk.internal.internal_api.Api,
          "push_to_run_queue_introspection",
          patched_push_to_run_queue_introspection,
      )
  
      def patched_create_run_queue_introspection(*args, **kwargs):
          args[0].server_create_run_queue_supports_drc = True
          args[0].server_create_run_queue_supports_priority = True
          return (True, True, True)
  
      monkeypatch.setattr(
          wandb.sdk.internal.internal_api.Api,
          "create_run_queue_introspection",
          patched_create_run_queue_introspection,
      )
  
      queue_name = "prio_queue"
      proj = "test1"
      queue_config = {}
      base_config = {}
  
      with relay_server() as relay, runner.isolated_filesystem():
          api = PublicApi(api_key=user)
          api.create_run_queue(
              entity=user,
              name=queue_name,
              type="local-container",
              config=queue_config,
              prioritization_mode="V0",
          )
          _ = launch_add(
              project=proj,
              entity=user,
              queue_name=queue_name,
              docker_image="abc:latest",
              config=base_config,
              priority=0,
          )
          for comm in relay.context.raw_data:
              q = comm["request"].get("query")
              if q and "mutation pushToRunQueueByName(" in str(q):
                  assert comm["response"].get("data") is not None
              elif q and "mutation pushToRunQueue(" in str(q):
                  raise Exception(
                      "should not be falling back to legacy here"
                  )
  
imports: import json
  import os
  from unittest import mock
  import pytest
  import wandb
  from wandb.apis.public import Api
  from wandb.sdk.internal.internal_api import Api
  from wandb.sdk.internal.internal_api import UnsupportedError
  from wandb.sdk.launch._launch_add import launch_add
  from wandb.sdk.launch.utils import LAUNCH_DEFAULT_PROJECT, LaunchError
label_desc: Use image node_id 11 for calling a global function with example usage: test_launch_add_with_priority(runner, relay_server, user, monkeypatch) and returns: True,  True, True,  True,  True