code: def test_gpu_apple(test_settings):
      with mock.patch.object(
          wandb.sdk.internal.system.assets.gpu_apple.GPUAppleStats,
          "sample",
          mock_gpu_apple_stats_sample,
      ), mock.patch.multiple(
          "wandb.sdk.internal.system.assets.gpu_apple.platform",
          system=lambda: "Darwin",
          processor=lambda: "arm",
      ):
          interface = AssetInterface()
          settings = SettingsStatic(
              test_settings(
                  dict(
                      _stats_sample_rate_seconds=0.1,
                      _stats_samples_to_average=2,
                  )
              ).to_proto()
          )
          shutdown_event = threading.Event()
  
          gpu = GPUApple(
              interface=interface,
              settings=settings,
              shutdown_event=shutdown_event,
          )
          assert gpu.is_available()
          gpu.start()
          assert gpu.probe() == {
              "gpuapple": {"type": "arm", "vendor": "Apple"}
          }
          time.sleep(1)
          shutdown_event.set()
          gpu.finish()
  
          assert not interface.metrics_queue.empty()
  
file_path: wandb/tests/pytest_tests/unit_tests/test_system_metrics/test_gpu_apple.py
imports: import threading
  import time
  from unittest import mock
  import wandb
  from wandb.sdk.internal.settings_static import SettingsStatic
  from wandb.sdk.internal.system.assets import GPUApple
  from wandb.sdk.internal.system.assets.gpu_apple import _Stats
  from wandb.sdk.internal.system.system_monitor import AssetInterface
label_desc: Use image node_id 2 for calling a global function with example usage: test_gpu_apple(test_settings) without return types