code: def test_library_usages(
      call_ray_start, reset_usage_stats, ray_client
  ):
      from ray.job_submission import JobSubmissionClient
  
      address = call_ray_start
      ray.init(address=address)
  
      driver = """
  import ray
  import ray._private.usage.usage_lib as ray_usage_lib
  
  ray_usage_lib.record_library_usage("pre_init")
  ray.init(address="{}")
  
  ray_usage_lib.record_library_usage("post_init")
  ray.workflow.init()
  ray.data.range(10)
  from ray import serve
  
  serve.start()
  serve.shutdown()
  
  class Actor:
      def get_actor_metadata(self):
          return "metadata"
  
  from ray.util.actor_group import ActorGroup
  actor_group = ActorGroup(Actor)
  
  actor_pool = ray.util.actor_pool.ActorPool([])
  
  from ray.util.multiprocessing import Pool
  pool = Pool()
  
  from ray.util.queue import Queue
  queue = Queue()
  
  import joblib
  from ray.util.joblib import register_ray
  register_ray()
  with joblib.parallel_backend("ray"):
      pass
  """.format(
          "ray://127.0.0.1:10001" if ray_client else address
      )
      run_string_as_driver(driver)
  
      if sys.platform != "win32":
          job_submission_client = JobSubmissionClient(
              "http://127.0.0.1:8265"
          )
          job_id = job_submission_client.submit_job(entrypoint="ls")
          wait_for_condition(
              lambda: job_submission_client.get_job_status(job_id)
              == ray.job_submission.JobStatus.SUCCEEDED
          )
  
      library_usages = ray_usage_lib.get_library_usages_to_report(
          ray.experimental.internal_kv.internal_kv_get_gcs_client()
      )
      expected = {
          "pre_init",
          "post_init",
          "dataset",
          "workflow",
          "serve",
          "util.ActorGroup",
          "util.ActorPool",
          "util.multiprocessing.Pool",
          "util.Queue",
          "util.joblib",
      }
      if sys.platform != "win32":
          expected.add("job_submission")
      if ray_client:
          expected.add("client")
      assert set(library_usages) == expected
  
imports: import json
  import os
  import pathlib
  import sys
  import time
  from dataclasses import asdict
  from pathlib import Path
  from unittest.mock import patch
  import requests
  import pytest
  from jsonschema import validate
  from http.server import BaseHTTPRequestHandler, HTTPServer
  import ray
  import ray._private.usage.usage_constants
  import ray._private.usage.usage_lib
  from ray._private.test_utils import format_web_url, run_string_as_driver, wait_for_condition, wait_until_server_available
  from ray._private.usage.usage_lib import ClusterConfigToReport, UsageStatsEnabledness
  from ray.autoscaler._private.cli_logger import cli_logger
  from ray.util.placement_group import placement_group
  from ray._private.accelerators import NvidiaGPUAcceleratorManager
label_desc: Use image node_id 20 for calling a global function with example usage: test_library_usages(call_ray_start, reset_usage_stats, ray_client) without return types