code: def test_single_device_module_to_device():
      strategy = SingleDeviceStrategy()
      strategy._root_device = Mock()
      module = Mock(spec=torch.nn.Module)
      strategy.module_to_device(module)
      module.to.assert_called_with(strategy.root_device)
  
file_path: pytorch-lightning/tests/tests_fabric/strategies/test_single_device.py
imports: from unittest.mock import Mock
  import pytest
  import torch
  from lightning.fabric import Fabric
  from lightning.fabric.strategies import SingleDeviceStrategy
  from tests_fabric.helpers.runif import RunIf
label_desc: Use image node_id 5 for calling a global function with example usage: test_single_device_module_to_device() without return types