code: def get_coarse_adapter_spec(
      adapter_spec: AdapterSpec,
      scenario_spec: Optional[ScenarioSpec] = None,
      adapter_keys_shown: List[str] = [],
  ) -> AdapterSpec:
      """
      Return an abstraction of an AdapterSpec that corresponds to the method
      (e.g., model, decoding parameters), and not the part that contains
      scenario-specific things like instructions.
      This is not an easy thing to disentangle, so just try our best
      in a necessarily scenario-specific way.
      """
      # TODO: clean up this logic a bit
      # Sometimes the instructions contain information about the scenario.
      if scenario_spec and scenario_spec.class_name.endswith(
          ".MMLUScenario"
      ):
          # MMLU: Sync up with logic in `get_mmlu_spec` for constructing the instructions.
          subject = scenario_spec.args["subject"].replace("_", " ")
          instructions = adapter_spec.instructions.replace(
              subject, "___"
          )
      elif scenario_spec and scenario_spec.class_name.endswith(
          ".RAFTScenario"
      ):
          # RAFT scenario has arbitrary instructions, so impossible to remove
          # the scenario information, so remove all of it.
          instructions = "<scenario specific>"
      else:
          instructions = adapter_spec.instructions
      adapter_spec = replace(adapter_spec, instructions=instructions)
  
      # Create a new adapter_spec, keeping only the model and the keys in adapter_keys_shown
      adapter_spec_kwargs = {
          key: adapter_spec.__dict__[key] for key in adapter_keys_shown
      }
      return AdapterSpec(**adapter_spec_kwargs)
  
imports: import argparse
  import os
  import datetime
  import urllib.parse
  import dacite
  import json
  from collections import defaultdict
  from dataclasses import dataclass, replace
  from statistics import mean, median
  from typing import List, Optional, Dict, Any, Tuple, Set
  from tqdm import tqdm
  from helm.common.general import write, ensure_directory_exists, asdict_without_nones, parallel_map, singleton, unique_simplification
  from helm.common.hierarchical_logger import hlog, htrack, htrack_block
  from helm.benchmark.scenarios.scenario import ScenarioSpec
  from helm.benchmark.adaptation.adapter_spec import AdapterSpec
  from helm.benchmark.metrics.metric_name import MetricName
  from helm.benchmark.metrics.metric import get_all_stats_by_name
  from helm.benchmark.metrics.statistic import Stat, merge_stat
  from helm.benchmark.runner import RunSpec, LATEST_SYMLINK
  from .table import Cell, HeaderCell, Table, Hyperlink, table_to_latex
  from .schema import MetricNameMatcher, RunGroup, read_schema, SCHEMA_YAML_FILENAME, BY_GROUP, THIS_GROUP_ONLY, NO_GROUPS
  from .contamination import read_contamination, validate_contamination, CONTAMINATION_SYMBOLS, CONTAMINATION_STYLES, CONTAMINATION_LEVEL_STRONG
  from .run_display import write_run_display_json
label_desc: Use image node_id 5 for calling a global function with example usage: get_coarse_adapter_spec(adapter_spec, scenario_spec, adapter_keys_shown) and returns: AdapterSpec