code: def create_all_contamination_stats(
      light_scenarios: List[LightScenario], n_values: List[int]
  ) -> AllContaminationStats:
      """Given a list of scenarios and n values, initialize all_contamination_stats"""
      hlog("Initializing all contamination stats")
      all_contamination_stats: AllContaminationStats = {}
      for scenario in light_scenarios:
          for n in n_values:
              # Initialize a stats instance for every pair of <scenario, n>
              stats: ContaminationStats = (
                  ContaminationStats.from_scenario(
                      scenario, stats_tags={"N": n}
                  )
              )
              if stats.stats_key in all_contamination_stats:
                  raise ValueError("Duplicated settings detected.")
              all_contamination_stats[stats.stats_key] = stats
      return all_contamination_stats
  
imports: import json
  import argparse
  import os
  import glob
  from typing import List, Tuple, Set, Any, Optional
  from nltk import ngrams
  from typing import Dict
  from tqdm import tqdm
  from dataclasses import dataclass
  from helm.benchmark.contamination.light_scenario import LightInstance, LightScenario, LightScenarioKey
  from helm.benchmark.contamination.light_tokenizer import LightTokenizer, DefaultTokenizer
  from helm.benchmark.contamination.load_documents import get_document_iterator
  from helm.benchmark.contamination.contamination_stats import ContaminationStats, ContaminationStatsKey, PART_INPUT, PART_REF
  from helm.common.hierarchical_logger import hlog, htrack_block
  from helm.common.general import asdict_without_nones, write
  from helm.benchmark.scenarios.scenario import ScenarioSpec
label_desc: Use image node_id 3 for calling a global function with example usage: create_all_contamination_stats(light_scenarios, n_values) and returns: all_contamination_stats