code: def test_patch_module_raise_warnings(inplace):
      test_module = torch.nn.Sequential(
          torch.nn.Linear(10, 5),
          torch.nn.ReLU(),
          torch.nn.Linear(5, 2),
      )
  
      with warnings.catch_warnings(record=True) as w:
          mc_test_module = (
              baal.bayesian.consistent_dropout.patch_module(
                  test_module, inplace=inplace
              )
          )
          assert len(w) == 1
          assert issubclass(w[-1].category, UserWarning)
          assert "No layer was modified by patch_module" in str(
              w[-1].message
          )
  
file_path: baal/tests/bayesian/consistent_dropout_test.py
imports: import warnings
  from copy import deepcopy
  import pytest
  import torch
  import baal.bayesian.consistent_dropout
label_desc: Use image node_id 6 for calling a global function with example usage: test_patch_module_raise_warnings(inplace) without return types