code: def save_scenarios_to_jsonl(
      light_scenarios: List[LightScenario], filename: str
  ):
      """
      Save a list of LightInstance to a jsonl file where each line represents a LightScenario object.
      """
      with open(filename, "w") as f:
          for light_scenario in light_scenarios:
              f.write(
                  json.dumps(
                      asdict_without_nones(light_scenario),
                      ensure_ascii=False,
                  )
                  + "\n"
              )
  
file_path: H2O/h2o_hf/helm/src/helm/benchmark/contamination/export_scenario_text.py
imports: import json
  import os
  import argparse
  from typing import List, DefaultDict
  from collections import defaultdict
  from helm.common.general import asdict_without_nones, ensure_directory_exists
  from helm.common.hierarchical_logger import hlog, htrack_block
  from helm.benchmark.scenarios.scenario import Scenario, Instance, create_scenario, TRAIN_SPLIT, VALID_SPLIT, TEST_SPLIT
  from helm.benchmark.presentation.run_entry import read_run_entries
  from helm.benchmark.run import run_entries_to_run_specs
  from helm.benchmark.runner import RunSpec
  from helm.benchmark.contamination.light_scenario import LightInstance, LightScenario, LightScenarioKey
label_desc: Use image node_id 3 for calling a global function with example usage: save_scenarios_to_jsonl(light_scenarios, filename) without return types