code: def test_mcdropconnect_replaces_all_dropout_layers_module(
      is_deterministic,
  ):
      test_module = SimpleModel()
  
      mc_test_module = MCDropoutConnectModule(
          test_module,
          layers=["Conv2d", "Linear", "LSTM", "GRU"],
          weight_dropout=0.5,
      )
  
      assert not any(
          module.p != 0
          for module in mc_test_module.modules()
          if isinstance(module, torch.nn.Dropout)
      )
      assert any(
          isinstance(module, WeightDropLinear)
          for module in mc_test_module.modules()
      )
      assert not is_deterministic(mc_test_module, (10, 3, 10, 10))
  
      regular_module = mc_test_module.unpatch().eval()
      assert all(
          module.p != 0
          for module in regular_module.modules()
          if isinstance(module, torch.nn.Dropout)
      )
  
      assert not any(
          isinstance(module, (WeightDropConv2d, WeightDropLinear))
          for module in regular_module.modules()
      )
      assert is_deterministic(regular_module, (10, 3, 10, 10))
  
file_path: baal/tests/bayesian/dropconnect_test.py
imports: import warnings
  import pytest
  import torch
  from baal.bayesian.weight_drop import patch_module, WeightDropLinear, MCDropoutConnectModule, WeightDropConv2d
label_desc: Use image node_id 4 for calling a global function with example usage: test_mcdropconnect_replaces_all_dropout_layers_module(is_deterministic) without return types