code: def test_adapt(self):
      scenario = create_scenario(get_scenario_spec1())
      adapter_spec = get_adapter_spec1()
      adapter = AdapterFactory.get_adapter(
          adapter_spec, self.tokenizer_service
      )
      scenario_state = adapter.adapt(
          scenario.get_instances(), parallelism=1
      )
  
      # Make sure we generated the right number of request_states:
      # For each trial, instance and reference (+ 1 for free-form generation).
      num_instances = len(scenario_state.instances)
      assert num_instances * adapter_spec.num_train_trials == len(
          scenario_state.request_states
      )
  
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 1 for calling the TestGenerationAdapter obj's underlying member method code with example usage: obj.test_adapt() without return types