code: def verify_module_duplicate_parameters_on_distinct_partitions(
      pipe_class,
  ):
      class Surrogate(nn.Module):
          def __init__(self, module):
              super().__init__()
              self.module = module
  
      conv = nn.Conv2d(3, 3, 1)
      model = nn.Sequential(Surrogate(conv), Surrogate(conv))
  
      # FIXME(tom) can't have duplicate params with separate processes
      with pytest.raises(
          ValueError,
          match="module with duplicate parameters on distinct devices is not supported",
      ):
          pipe_class(model, [1, 1], worker_map=get_worker_map())
  
imports: from collections import OrderedDict
  from copy import deepcopy
  import os
  import time
  import pytest
  import torch
  from torch import nn
  from fairscale.fair_dev.testing.testing import get_worker_map, torch_spawn
  from fairscale.internal import torch_version
  from fairscale.nn.model_parallel.initialize import get_pipeline_parallel_group
  from fairscale.nn.pipe import AsyncPipe
  from fairscale.nn.pipe.types import LazyModule
label_desc: Use image node_id 37 for calling a global function with example usage: verify_module_duplicate_parameters_on_distinct_partitions(pipe_class) without return types