code: def test_verify_module_params_on_same_device(setup_rpc):
      class Surrogate(nn.Module):
          def __init__(self, param1, param2):
              super().__init__()
              self.param1 = param1
              self.param2 = param2
  
      conv1 = nn.Conv2d(3, 3, 1)
      conv2 = nn.Conv2d(3, 3, 1)
      model = nn.Sequential(Surrogate(conv1, conv2.cuda()))
  
      with pytest.raises(
          ValueError,
          match=r"should have all parameters on a single device, please use .to\(\)"
          " to place the module on a single device",
      ):
          Pipe(model)
  
imports: from collections import OrderedDict
  from copy import deepcopy
  import time
  import pytest
  import random
  import torch
  from torch import nn
  from torch import Tensor
  from torch.distributed.pipeline.sync import Pipe, NoChunk, WithDevice
  from torch.distributed.pipeline.sync.pipe import PipeSequential
  from torch.testing._internal.common_utils import run_tests, TEST_CUDA
  from torch.testing._internal.common_cuda import TEST_MULTIGPU
label_desc: Use image node_id 37 for calling a global function with example usage: test_verify_module_params_on_same_device(setup_rpc) without return types