code: def test_train_with_frozen_adapter_fusion(self):
      tokenizer = AutoTokenizer.from_pretrained("bert-base-uncased")
      data_args = GlueDataTrainingArguments(
          task_name="mrpc",
          data_dir="./hf_transformers/tests/fixtures/tests_samples/MRPC",
          overwrite_cache=True,
      )
      train_dataset = GlueDataset(
          data_args, tokenizer=tokenizer, mode="train"
      )
  
      model = AutoAdapterModel.from_config(self.get_model_config())
  
      model.add_adapter("a")
      model.add_adapter("b")
  
      adapter_setup = Fuse("a", "b")
  
      model.add_adapter_fusion(adapter_setup, set_active=True)
  
      model.add_adapter("c")
      model.add_classification_head("c")
  
      model.train_adapter("c")
  
      model.active_adapters = Stack(Fuse("a", "b"), "c")
  
      # Since our config has a value matrix, make sure it is regularized.
      # We do this by patching the fusion regularization function.
      regularization_called = False
      orig_fusion_regularization_loss = (
          model.base_model.get_fusion_regularization_loss
      )
  
      def patched_fusion_reg_loss():
          nonlocal regularization_called
          regularization_called = True
          return orig_fusion_regularization_loss()
  
      model.base_model.get_fusion_regularization_loss = (
          patched_fusion_reg_loss
      )
  
      with TemporaryDirectory() as tempdir:
          training_args = TrainingArguments(
              output_dir=tempdir,
              do_train=True,
              learning_rate=0.1,
              logging_steps=1,
              max_steps=1,
              save_steps=1,
              remove_unused_columns=False,
          )
          trainer = AdapterTrainer(
              model=model,
              args=training_args,
              train_dataset=train_dataset,
          )
  
          trainer.train()
  
      self.assertTrue(regularization_called)
  
imports: import os
  import unittest
  from tempfile import TemporaryDirectory
  import torch
  import adapters
  from adapters import AutoAdapterModel
  from adapters.composition import Fuse, Stack
  from adapters.trainer import AdapterTrainer, logger
  from transformers import AutoModelForSequenceClassification, AutoTokenizer, BertConfig, BertForSequenceClassification, GlueDataset, GlueDataTrainingArguments, Trainer, TrainingArguments
  from transformers.testing_utils import require_ray, slow
label_desc: Use image node_id 11 for calling the TestAdapterTrainer obj's underlying member method code with example usage: obj.test_train_with_frozen_adapter_fusion() and returns: orig_fusion_regularization_loss