code: def test_data_parallel_module_to_device():
      strategy = DataParallelStrategy()
      strategy.parallel_devices = [torch.device("cuda", 2)]
      module = Mock()
      strategy.module_to_device(module)
      module.to.assert_called_with(torch.device("cuda", 2))
  
file_path: pytorch-lightning/tests/tests_fabric/strategies/test_dp.py
imports: from unittest import mock
  from unittest.mock import MagicMock, Mock
  import pytest
  import torch
  from lightning.fabric import Fabric
  from lightning.fabric.strategies import DataParallelStrategy
  from tests_fabric.helpers.runif import RunIf
  from tests_fabric.strategies.test_single_device import _run_test_clip_gradients
label_desc: Use image node_id 4 for calling a global function with example usage: test_data_parallel_module_to_device() without return types