class_docstr: Apple GPU stats available on Arm Macs.
class_docstr_tok: ["Apple","GPU","stats","available","on","Arm","Macs","."]
code: def aggregate(self) -> dict:
      if not self.samples:
          return {}
      stats = {}
      for key in self.samples[0].keys():
          samples = [s[key] for s in self.samples]  # type: ignore
          aggregate = aggregate_mean(samples)
          stats[self.name.format(key)] = aggregate
      return stats
  
imports: import json
  import logging
  import pathlib
  import platform
  import subprocess
  import sys
  import threading
  from collections import deque
  from typing import TYPE_CHECKING, List
  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 4 for calling the GPUAppleStats obj's underlying member method code with example usage: obj.aggregate() and returns: stats, dict