code: def test_get_device_stats(tmpdir):
      gpu_stats = CPUAccelerator().get_device_stats(Mock())
      fields = ["cpu_vm_percent", "cpu_percent", "cpu_swap_percent"]
  
      for f in fields:
          assert any(f in h for h in gpu_stats)
  
file_path: pytorch-lightning/tests/tests_pytorch/accelerators/test_cpu.py
imports: import os
  from pathlib import Path
  from typing import Any, Dict, Union
  from unittest.mock import Mock
  import lightning.pytorch
  import pytest
  import torch
  from lightning.fabric.plugins import TorchCheckpointIO
  from lightning.pytorch import Trainer
  from lightning.pytorch.accelerators import CPUAccelerator
  from lightning.pytorch.demos.boring_classes import BoringModel
  from lightning.pytorch.plugins.precision.precision import Precision
  from lightning.pytorch.strategies import SingleDeviceStrategy
  from tests_pytorch.helpers.runif import RunIf
label_desc: Use image node_id 3 for calling a global function with example usage: test_get_device_stats(tmpdir) without return types