code: def record_library_usage(library_usage: str):
      """Record library usage (e.g. which library is used)"""
      with _recorded_library_usages_lock:
          if library_usage in _recorded_library_usages:
              return
          _recorded_library_usages.add(library_usage)
  
      if not _internal_kv_initialized():
          # This happens if the library is imported before ray.init
          return
  
      # Only report lib usage for driver / ray client / workers. Otherwise,
      # it can be reported if the library is imported from
      # e.g., API server.
      if (
          ray._private.worker.global_worker.mode == ray.SCRIPT_MODE
          or ray._private.worker.global_worker.mode == ray.WORKER_MODE
          or ray.util.client.ray.is_connected()
      ):
          _put_library_usage(library_usage)
  
imports: import json
  import logging
  import threading
  import os
  import platform
  import sys
  import time
  import uuid
  from dataclasses import asdict, dataclass
  from enum import Enum, auto
  from pathlib import Path
  from typing import Dict, List, Optional, Set
  import requests
  import yaml
  import ray
  import ray._private.ray_constants
  import ray._private.usage.usage_constants
  from ray.experimental.internal_kv import _internal_kv_initialized, _internal_kv_put
  from ray.core.generated import usage_pb2, gcs_pb2
label_desc: Use image node_id 8 for calling a global function with example usage: record_library_usage(library_usage) without return types