code: def test_equivalent_language_generation(self):
      if (
          self.config_class
          not in MODEL_FOR_SEQ_TO_SEQ_CAUSAL_LM_MAPPING
      ):
          self.skipTest("no causal lm class.")
  
      static_model = MODEL_FOR_SEQ_TO_SEQ_CAUSAL_LM_MAPPING[
          self.config_class
      ](self.config())
      adapters.init(static_model)
      flex_model = AutoAdapterModel.from_pretrained(
          None,
          config=self.config(),
          state_dict=static_model.state_dict(),
      )
      static_model.add_adapter("dummy")
      static_model.set_active_adapters("dummy")
      static_model.eval()
      flex_model.eval()
  
      with tempfile.TemporaryDirectory() as temp_dir:
          static_model.save_adapter(temp_dir, "dummy")
  
          loading_info = {}
          flex_model.load_adapter(temp_dir, loading_info=loading_info)
          flex_model.set_active_adapters("dummy")
  
      input_shape = (self.batch_size, 5)
      input_samples = self.get_input_samples(
          input_shape, config=flex_model.config
      )
  
      static_model.to(torch_device)
      flex_model.to(torch_device)
  
      model_gen = static_model.generate(**input_samples)
      flex_model_gen = flex_model.generate(**input_samples)
  
      self.assertEquals(model_gen.shape, flex_model_gen.shape)
      self.assertTrue(torch.equal(model_gen, flex_model_gen))
  
file_path: adapters/tests/test_adapter_conversion.py
imports: import inspect
  import re
  import tempfile
  import torch
  import adapters
  from adapters import AutoAdapterModel
  from transformers import MODEL_FOR_CAUSAL_LM_MAPPING, MODEL_FOR_IMAGE_CLASSIFICATION_MAPPING, MODEL_FOR_MASKED_LM_MAPPING, MODEL_FOR_MULTIPLE_CHOICE_MAPPING, MODEL_FOR_QUESTION_ANSWERING_MAPPING, MODEL_FOR_SEQ_TO_SEQ_CAUSAL_LM_MAPPING, MODEL_FOR_SEQUENCE_CLASSIFICATION_MAPPING, MODEL_FOR_TOKEN_CLASSIFICATION_MAPPING, AlbertPreTrainedModel, BertPreTrainedModel, RobertaPreTrainedModel, XLMRobertaPreTrainedModel, XmodPreTrainedModel
  from transformers.testing_utils import require_torch, torch_device
label_desc: Use image node_id 10 for calling the ModelClassConversionTestMixin obj's underlying member method code with example usage: obj.test_equivalent_language_generation() without return types