class_docstr: The client implementation for usage report.
  
  It is in charge of writing usage stats to the directory
  and report usage stats.
class_docstr_tok: ["The","client","implementation","for","usage","report",".","It","is","in","charge","of","writing","usage","stats","to","the","directory","and","report","usage","stats","."]
docstr: Report the usage data to the usage server.
  
  Params:
      url: The URL to update resource usage.
      data: Data to report.
  
  Raises:
      requests.HTTPError if requests fails.
code: def report_usage_data(
      self, url: str, data: UsageStatsToReport
  ) -> None:
      """Report the usage data to the usage server.
  
      Params:
          url: The URL to update resource usage.
          data: Data to report.
  
      Raises:
          requests.HTTPError if requests fails.
      """
      r = requests.request(
          "POST",
          url,
          headers={"Content-Type": "application/json"},
          json=asdict(data),
          timeout=10,
      )
      r.raise_for_status()
      return r
  
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 2 for calling the UsageReportClient obj's underlying member method code with example usage: obj.report_usage_data(url, data) and returns: r