code: def get_rocm_smi_stats() -> Dict[str, Any]:
      command = [str(ROCM_SMI_CMD), "-a", "--json"]
      output = (
          subprocess.check_output(command, universal_newlines=True)
          .strip()
          .split("\n")
      )[0]
      return json.loads(output)
  
imports: import json
  import logging
  import shutil
  import subprocess
  import sys
  import threading
  from collections import deque
  from typing import TYPE_CHECKING, Any, Dict, List, Union
  from wandb.sdk.lib import telemetry
  from .aggregators import aggregate_mean
  from .asset_registry import asset_registry
  from .interfaces import Interface, Metric, MetricsMonitor
label_desc: Use image node_id 1 for calling a global function with example usage: get_rocm_smi_stats() and returns: json