code: def test_adapter_with_head(self):
      model1, model2 = create_twin_models(AutoAdapterModel, self.config)
  
      name = "dummy"
      model1.add_adapter(name)
      output_size = self.add_head(model1, name, num_labels=3)
      model1.set_active_adapters(name)
      with tempfile.TemporaryDirectory() as temp_dir:
          model1.save_adapter(temp_dir, name)
  
          model2.load_adapter(temp_dir)
          model2.set_active_adapters(name)
      # check equal output
      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]))
      self.assertEqual(output_size, output1[0].size()[1])
  
imports: import os
  import tempfile
  import torch
  import adapters
  from adapters import ADAPTER_MODEL_MAPPING, AdapterSetup, AutoAdapterModel
  from adapters.composition import BatchSplit, Stack
  from transformers import AutoModelForSequenceClassification
  from transformers.testing_utils import require_torch, torch_device
  from .methods import create_twin_models
label_desc: Use image node_id 13 for calling the PredictionHeadModelTestMixin obj's underlying member method code with example usage: obj.test_adapter_with_head() without return types