code: def test_task_job_ids(shutdown_only):
      info = ray.init(num_cpus=2, **METRIC_CONFIG)
  
      driver = """
  import ray
  import time
  
  ray.init("auto")
  
  @ray.remote(num_cpus=0)
  def f():
      time.sleep(999)
  a = [f.remote() for _ in range(1)]
  ray.get(a)
  """
      procs = [
          run_string_as_driver_nonblocking(driver) for _ in range(3)
      ]
      expected = {
          "RUNNING": 3.0,
      }
      wait_for_condition(
          lambda: tasks_by_state(info) == expected,
          timeout=20,
          retry_interval_ms=500,
      )
  
      # Check we have three jobs reporting "RUNNING".
      metrics = raw_metrics(info)
      jobs_at_state = defaultdict(set)
      for sample in metrics["ray_tasks"]:
          jobs_at_state[sample.labels["State"]].add(
              sample.labels["JobId"]
          )
      print("Jobs at state: {}".format(jobs_at_state))
      assert len(jobs_at_state["RUNNING"]) == 3, jobs_at_state
  
      for proc in procs:
          proc.kill()
  
imports: from collections import defaultdict
  import sys
  import os
  import copy
  import pytest
  import ray
  from ray._private.metrics_agent import RAY_WORKER_TIMEOUT_S
  from ray._private.test_utils import raw_metrics, run_string_as_driver, run_string_as_driver_nonblocking, wait_for_condition
label_desc: Use image node_id 6 for calling a global function with example usage: test_task_job_ids(shutdown_only) without return types