docstr: Expect an exception when trying to wrap an unsupported module
docstr_tok: ["Expect","an","exception","when","trying","to","wrap","an","unsupported","module"]
code: def test_unsupported_exception(self):
      """Expect an exception when trying to wrap an unsupported module"""
  
      class UnsupportedModule(torch.nn.Module):
          def __init__(self):
              super().__init__()
              self.weights = torch.nn.Parameter(torch.rand(10, 10))
  
      with self.assertRaises(ValueError):
          PackNetModel(UnsupportedModule())
  
      with self.assertRaises(ValueError):
          PackNetModel(torch.nn.BatchNorm2d(10))
  
file_path: avalanche/tests/models/test_packnet.py
imports: import unittest
  from avalanche.models.packnet import PackNetModel, packnet_simple_mlp
  from avalanche.training.supervised.strategy_wrappers import PackNet
  from torch.optim import SGD, Adam
  import torch
  import os
  from tests.unit_tests_utils import get_fast_benchmark
  from functools import partial
label_desc: Use image node_id 4 for calling the TestPackNet obj's underlying member method code with example usage: obj.test_unsupported_exception() without return types