code: def test_push_to_runqueue_exists(
      relay_server,
      user,
      mocked_fetchable_git_repo,
      wandb_init,
      test_settings,
  ):
      proj = "test_project2"
      queue = "existing-queue"
      uri = "https://github.com/FooBar/examples.git"
      entry_point = ["python", "train.py"]
      args = {
          "uri": uri,
          "project": proj,
          "entity": user,
          "queue": "default",
          "entry_point": entry_point,
          "resource": "local-process",
      }
  
      settings = test_settings({"project": LAUNCH_DEFAULT_PROJECT})
  
      with relay_server() as relay:
          run = wandb_init(settings=settings)
          api = wandb.sdk.internal.internal_api.Api()
          api.create_run_queue(
              entity=user,
              project=LAUNCH_DEFAULT_PROJECT,
              queue_name=queue,
              access="USER",
          )
  
          result = api.push_to_run_queue(
              queue, args, None, LAUNCH_DEFAULT_PROJECT
          )
  
          assert result["runQueueItemId"]
  
          run.finish()
  
      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 6 for calling a global function with example usage: test_push_to_runqueue_exists(relay_server, user, mocked_fetchable_git_repo, wandb_init, test_settings) without return types