code: def test_context_simple(self, expected_number_of_adapter_calls=1):
      model = AutoAdapterModel.from_config(self.config())
      model.add_adapter("a")
      output_size = self.add_head(model, "a", num_labels=3)
      # Make sure no adapter is activated
      model.active_adapters = None
      model.active_head = None
      model.to(torch_device)
      in_data = self.get_input_samples(config=model.config)
  
      # Set a hook before the adapter to make sure it's actually called.
      calls = 0
  
      def forward_pre_hook(module, input):
          nonlocal calls
          calls += 1
  
      adapter = model.get_adapter("a")[0]["output_adapter"]
      adapter.register_forward_pre_hook(forward_pre_hook)
  
      with AdapterSetup("a"):
          out = model(**in_data)
  
      self.assertEqual(out[0].shape[:2], (3, output_size))
      self.assertEqual(calls, expected_number_of_adapter_calls)
  
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 20 for calling the PredictionHeadModelTestMixin obj's underlying member method code with example usage: obj.test_context_simple(expected_number_of_adapter_calls) without return types