class_docstr: Google Cloud TPU utilization in percent.
class_docstr_tok: ["Google","Cloud","TPU","utilization","in","percent","."]
code: def __init__(
      self,
      service_addr: str,
      duration_ms: int = 100,
  ) -> None:
      self.samples = deque([])
  
      self.duration_ms = duration_ms
      self.service_addr = service_addr
  
      try:
          from tensorflow.python.profiler import profiler_client  # type: ignore
  
          self._profiler_client = profiler_client
      except ImportError:
          logger.warning(
              "Unable to import `tensorflow.python.profiler.profiler_client`. "
              "TPU metrics will not be reported."
          )
          self._profiler_client = None
  
file_path: wandb/wandb/sdk/internal/system/assets/tpu.py
imports: import logging
  import os
  import threading
  from collections import deque
  from typing import TYPE_CHECKING, List, Optional
  from .aggregators import aggregate_mean
  from .asset_registry import asset_registry
  from .interfaces import Interface, Metric, MetricsMonitor
label_desc: Use image node_id 1 to create a new TPUUtilization object  with example: obj = TPUUtilization(service_addr, duration_ms)