code: def test_config_immutable(self):
      def set_attr(config: AdapterConfig):
          config.non_linearity = "dummy"
          config.r = -1  # for LoRA
          config.prompt_length = -1  # for PromptTuning
  
      for config in ADAPTER_CONFIG_MAP.values():
          if isinstance(config, ConfigUnion):
              continue
          with self.subTest(config=config.__class__.__name__):
              self.assertRaises(
                  FrozenInstanceError, lambda: set_attr(config)
              )
  
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 2 for calling the AdapterConfigTest obj's underlying member method code with example usage: obj.test_config_immutable() without return types