code: def test_torch_quantizer_validation(self):
      # test bad configuration
      quantizer_classes = [
          NaiveQuantizer,
          QAT_Quantizer,
          DoReFaQuantizer,
          BNNQuantizer,
      ]
  
      bad_configs = [
          [{"bad_key": "abc"}],
          [{"quant_types": "abc"}],
          [{"quant_bits": 34}],
          [{"op_types": "default"}],
          [{"quant_bits": {"abc": 123}}],
      ]
      model = TorchModel()
      optimizer = torch.optim.SGD(model.parameters(), lr=0.01)
      for quantizer_class in quantizer_classes:
          for config_list in bad_configs:
              try:
                  quantizer_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:", quantizer_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 10 for calling the CompressorTestCase obj's underlying member method code with example usage: obj.test_torch_quantizer_validation() without return types