code: def test_custom_class(self):
      @dataclass
      class CustomAdapterConfig(SeqBnConfig):
          custom_attr: str = "test_value"
  
      config = CustomAdapterConfig()
      config_dict = config.to_dict()
      self.assertEqual(config_dict["custom_attr"], "test_value")
      # When calling load on an AdapterConfig instance, don't change the class of the config.
      config = AdapterConfig.load(config, custom_attr="test_value_2")
      self.assertTrue(isinstance(config, CustomAdapterConfig))
      self.assertEqual(config["custom_attr"], "test_value_2")
  
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 4 for calling the AdapterConfigTest obj's underlying member method code with example usage: obj.test_custom_class() without return types