code: def test_patch_module_changes_weights(
      inplace, layers, is_deterministic
  ):
      test_module = SimpleModel()
      test_module.eval()
      simple_input = torch.randn(10, 3, 10, 10)
      assert torch.allclose(
          test_module(simple_input), test_module(simple_input)
      )
  
      mc_test_module = patch_module(
          test_module,
          layers=layers,
          weight_dropout=0.2,
          inplace=inplace,
      )
  
      # objects should be the same if inplace is True and not otherwise:
      assert (mc_test_module is test_module) == inplace
      assert not is_deterministic(mc_test_module, (10, 3, 10, 10))
  
      assert list(mc_test_module.modules())[3].p == 0
  
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 1 for calling a global function with example usage: test_patch_module_changes_weights(inplace, layers, is_deterministic) without return types