code: def run_parallel_training_test(self, adapter_config, filter_key):
      model = AutoAdapterModel.from_config(self.config())
  
      model.add_adapter("mrpc1", config=adapter_config)
      model.add_adapter("mrpc2", config=adapter_config)
      self.add_head(model, "mrpc1")
      self.add_head(model, "mrpc2")
      model.active_adapters = Parallel("mrpc1", "mrpc2")
      model.train_adapter(Parallel("mrpc1", "mrpc2"))
      # model.eval()
  
      # all weights of the adapter should be activated
      for k, v in filter_parameters(
          model, filter_key.format("mrpc1")
      ).items():
          self.assertTrue(v.requires_grad, k)
      # all weights of the adapter not used for training should be frozen
      for k, v in filter_parameters(
          model, filter_key.format("mrpc1")
      ).items():
          self.assertTrue(v.requires_grad, k)
      # weights of the model should be frozen (check on some examples)
      for k, v in filter_parameters(
          model, "encoder.layer.0.attention"
      ).items():
          if (
              filter_key.format("mrpc1") not in k
              and filter_key.format("mrpc2") not in k
          ):
              self.assertFalse(v.requires_grad, k)
  
      state_dict_pre = copy.deepcopy(model.state_dict())
  
      train_dataset = self.dataset()
      training_args = TrainingArguments(
          output_dir="./examples",
          do_train=True,
          learning_rate=1.0,
          max_steps=20,
          no_cuda=True,
          remove_unused_columns=False,
      )
  
      # evaluate
      trainer = Trainer(
          model=model,
          args=training_args,
          train_dataset=train_dataset,
      )
      trainer.train()
  
      # check that the weights of the adapters have changed
      self.assertTrue(
          any(
              [
                  not torch.equal(v, state_dict_pre[k])
                  for k, v in model.state_dict().items()
                  if "mrpc" in k
              ]
          )
      )
      self.assertTrue(
          all(
              torch.equal(v, state_dict_pre[k])
              for k, v in model.state_dict().items()
              if "mrpc" not in k
          )
      )
  
imports: import copy
  import random
  import torch
  from adapters import ADAPTER_MODEL_MAPPING, AutoAdapterModel, PrefixTuningConfig, SeqBnConfig, T5AdapterModel
  from adapters.composition import BatchSplit, Parallel
  from adapters.models.bert_generation.adapter_model import BertGenerationAdapterModel
  from transformers import MODEL_FOR_SEQUENCE_CLASSIFICATION_MAPPING, Trainer, TrainingArguments
  from transformers.testing_utils import require_torch, torch_device
label_desc: Use image node_id 3 for calling the ParallelTrainingMixin obj's underlying member method code with example usage: obj.run_parallel_training_test(adapter_config, filter_key) without return types