code: def test_adapter_fusion_save_with_head(self):
      if self.config_class not in ADAPTER_MODEL_MAPPING:
          self.skipTest("Does not support flex heads.")
      model1 = AutoAdapterModel.from_config(self.config())
      model1.eval()
  
      name1 = "name1"
      name2 = "name2"
      head_name = "adapter_fusion_head"
      model1.add_adapter(name1)
      model1.add_adapter(name2)
      model2 = copy.deepcopy(model1)
      model2.eval()
      model1.add_adapter_fusion([name1, name2])
      self.add_head(model1, head_name)
      model1.set_active_adapters(Fuse(name1, name2))
      # save & reload model
      with tempfile.TemporaryDirectory() as temp_dir:
          model1.save_adapter_fusion(
              temp_dir, ",".join([name1, name2]), with_head=head_name
          )
          model2.load_adapter_fusion(temp_dir, set_active=True)
  
      self.assertTrue(head_name in model2.heads)
      self.assertEqual(model1.active_head, model2.active_head)
      self.assertEqual(model1.active_adapters, model2.active_adapters)
  
      # assert equal forward pass
      in_data = self.get_input_samples(config=model1.config)
      model1.to(torch_device)
      model2.to(torch_device)
      output1 = model1(**in_data)
      output2 = model2(**in_data)
      self.assertEqual(len(output1), len(output2))
      self.assertTrue(torch.equal(output1[0], output2[0]))
  
file_path: adapters/tests/test_adapter_fusion_common.py
imports: import copy
  import os
  import tempfile
  from dataclasses import asdict
  import torch
  from adapters import ADAPTER_MODEL_MAPPING, ADAPTERFUSION_CONFIG_MAP, AdapterConfig, AutoAdapterModel, SeqBnConfig
  from adapters.composition import Fuse
  from adapters.utils import ADAPTERFUSION_WEIGHTS_NAME
  from adapters.wrappers import load_model
  from transformers.testing_utils import require_torch, torch_device
label_desc: Use image node_id 7 for calling the AdapterFusionModelTestMixin obj's underlying member method code with example usage: obj.test_adapter_fusion_save_with_head() without return types