code: def test_construct_prompt(self):
      adapter_spec = AdapterSpec(
          model="openai/davinci",
          method=ADAPT_GENERATION,
          input_prefix="",
          input_suffix="",
          output_prefix="",
          output_suffix="",
          max_tokens=100,
      )
      adapter = AdapterFactory.get_adapter(
          adapter_spec, self.tokenizer_service
      )
      correct_reference = Reference(Output(text=""), tags=[CORRECT_TAG])
      train_instances: List[Instance] = [
          Instance(Input(text="train"), references=[correct_reference])
          for _ in range(2049)
      ]
      eval_instances = Instance(Input(text="eval"), references=[])
      prompt: Prompt = adapter.construct_prompt(
          train_instances,
          eval_instances,
          include_output=False,
          reference_index=None,
      )
      prompt_text: str = prompt.text
  
      # Ensure the prompt fits within the context window
      assert adapter.window_service.fits_within_context_window(
          prompt_text
      )
  
      # Ensure the in-context examples were removed before touching the evaluation instance
      assert prompt_text.endswith("eval")
  
file_path: H2O/h2o_hf/helm/src/helm/benchmark/adaptation/adapters/test_generation_adapter.py
imports: from typing import List
  from helm.benchmark.scenarios.scenario import CORRECT_TAG, create_scenario, Instance, Reference, Input, Output
  from helm.benchmark.run_specs import get_scenario_spec1, get_adapter_spec1
  from helm.benchmark.adaptation.prompt import Prompt
  from helm.benchmark.adaptation.adapter_spec import AdapterSpec
  from .adapter_factory import AdapterFactory, ADAPT_GENERATION
  from .test_adapter import TestAdapter
label_desc: Use image node_id 2 for calling the TestGenerationAdapter obj's underlying member method code with example usage: obj.test_construct_prompt() without return types