code: def test_config_string_invalid(self):
      to_test = [
          ("seq_bn[invalid_key=2]", TypeError),
          ("lora[r=8]|invalid_name", ValueError),
          ("prefix_tuning[flat=True", ValueError),
          (
              "double_seq_bn[reduction_factor=dict(default=1)]",
              ValueError,
          ),
      ]
      for config_str, error_type in to_test:
          with self.subTest(config_str=config_str):
              self.assertRaises(
                  error_type, AdapterConfig.load, config_str
              )
  
file_path: adapters/tests/test_adapter_config.py
imports: import json
  import unittest
  from dataclasses import FrozenInstanceError, dataclass
  from adapters import ADAPTER_CONFIG_MAP, AdapterConfig, ConfigUnion, DoubleSeqBnConfig, LoRAConfig, MAMConfig, ParBnConfig, PrefixTuningConfig, SeqBnConfig
  from transformers.testing_utils import require_torch
label_desc: Use image node_id 8 for calling the AdapterConfigTest obj's underlying member method code with example usage: obj.test_config_string_invalid() without return types