code: def test_torch_pruner_validation(self):
      # test bad configuration
  
      pruner_classes = [
          LevelPruner,
          SlimPruner,
          FPGMPruner,
          L1FilterPruner,
          L2FilterPruner,
          AGPPruner,
          ActivationMeanRankFilterPruner,
          ActivationAPoZRankFilterPruner,
      ]
  
      bad_configs = [
          [{"sparsity": "0.2"}, {"sparsity": 0.6}],
          [{"sparsity": 0.2}, {"sparsity": 1.6}],
          [{"sparsity": 0.2, "op_types": "default"}, {"sparsity": 0.6}],
          [{"sparsity": 0.2}, {"sparsity": 0.6, "op_names": "abc"}],
      ]
      model = TorchModel()
      optimizer = torch.optim.SGD(model.parameters(), lr=0.01)
      for pruner_class in pruner_classes:
          for config_list in bad_configs:
              try:
                  pruner_class(model, config_list, optimizer)
                  print(config_list)
                  assert (
                      False
                  ), "Validation error should be raised for bad configuration"
              except schema.SchemaError:
                  pass
              except:
                  print("FAILED:", pruner_class, config_list)
                  raise
  
imports: from unittest import TestCase, main
  import numpy
  import torch
  import torch.nn.functional
  import schema
  from aup.compression.torch.pruning import *
  from aup.compression.torch.quantization import *
  import math
label_desc: Use image node_id 9 for calling the CompressorTestCase obj's underlying member method code with example usage: obj.test_torch_pruner_validation() without return types