code: def test_init_with_adapter(
      self, encoder_config: LLMEncoderConfig, adapter: str, model_config
  ):
      from peft import PeftModel
  
      encoder_config_with_adapter = (
          self.create_encoder_config_with_adapter(
              encoder_config, adapter
          )
      )
      encoder = LLMEncoder(encoder_config=encoder_config_with_adapter)
  
      # The adapter should not be initialized until `prepare_for_training` is called
      assert not isinstance(encoder.model, PeftModel)
      assert not any(
          map(lambda k: "lora_" in k, encoder.state_dict().keys())
      )
  
      assert encoder.model_name == encoder_config.base_model
      assert encoder.input_shape == torch.Size(
          [encoder_config.max_sequence_length]
      )
      assert encoder.output_shape == torch.Size(
          [encoder_config.max_sequence_length, model_config.hidden_size]
      )
  
imports: import copy
  import pytest
  import torch
  import torch.nn
  from transformers import AutoConfig, PreTrainedModel
  from ludwig.encoders.text_encoders import LLMEncoder
  from ludwig.schema.encoders.text_encoders import LLMEncoderConfig
  from ludwig.schema.llms.peft import BaseAdapterConfig, LoraConfig
  from ludwig.utils.llm_utils import get_context_len
label_desc: Use image node_id 3 for calling the TestLLMEncoder obj's underlying member method code with example usage: obj.test_init_with_adapter(encoder_config, adapter, model_config) without return types