code: def test_cpu_device():
      model = SubSubModule().cuda()
      assert model.device.type == "cuda"
      assert model.device.index == 0
      model.cpu()
      assert model.device.type == "cpu"
      assert model.device.index is None
  
imports: import pytest
  import torch
  from lightning.fabric.utilities.device_dtype_mixin import _DeviceDtypeModuleMixin
  from torch import nn
  from tests_fabric.helpers.runif import RunIf
label_desc: Use image node_id 3 for calling a global function with example usage: test_cpu_device() without return types