code: def get_experiment_summary_code_card(cfg) -> str:
      repo_id: Optional[str] = None
      hf_yaml_path = f"{cfg.output_directory}/hf.yaml"
  
      with open(
          os.path.join(
              "model_cards", cfg.environment._summary_card_template
          ),
          "r",
      ) as f:
          text = f.read()
  
      if os.path.exists(hf_yaml_path):
          with open(hf_yaml_path, "r") as fp:
              repo_id = yaml.load(fp, Loader=yaml.FullLoader)["repo_id"]
  
      if repo_id is None:
          repo_id = "account/model"
  
      # Model repo
      text = text.replace("{{repo_id}}", repo_id)
  
      # Versions
      text = text.replace(
          "{{transformers_version}}", transformers.__version__
      )
      text = text.replace("{{einops_version}}", einops.__version__)
      text = text.replace(
          "{{accelerate_version}}", accelerate.__version__
      )
      text = text.replace("{{torch_version}}", torch.__version__)
  
      # Configs
      text = text.replace(
          "{{text_prompt_start}}", str(cfg.dataset.text_prompt_start)
      )
      text = text.replace(
          "{{text_answer_separator}}",
          str(cfg.dataset.text_answer_separator),
      )
      text = text.replace(
          "{{end_of_sentence}}",
          str(cfg._tokenizer_eos_token)
          if cfg.dataset.add_eos_token_to_prompt
          else "",
      )
  
      text = text.replace(
          "{{trust_remote_code}}",
          str(cfg.environment.trust_remote_code),
      )
  
      if cfg.problem_type not in NON_GENERATION_PROBLEM_TYPES:
          text = text.replace(
              "{{min_new_tokens}}",
              str(cfg.prediction.min_length_inference),
          )
          text = text.replace(
              "{{max_new_tokens}}",
              str(cfg.prediction.max_length_inference),
          )
          text = text.replace(
              "{{use_fast}}", str(cfg.tokenizer.use_fast)
          )
          text = text.replace(
              "{{do_sample}}", str(cfg.prediction.do_sample)
          )
          text = text.replace(
              "{{num_beams}}", str(cfg.prediction.num_beams)
          )
          text = text.replace(
              "{{temperature}}", str(cfg.prediction.temperature)
          )
          text = text.replace(
              "{{repetition_penalty}}",
              str(cfg.prediction.repetition_penalty),
          )
  
      return text
  
imports: import glob
  import logging
  import os
  import shutil
  import time
  import zipfile
  from pathlib import Path
  from typing import Callable, List, Optional, Set
  import accelerate
  import einops
  import huggingface_hub
  import numpy
  import pandas
  import torch
  import transformers
  import yaml
  from h2o_wave import Q, data, ui
  from sqlitedict import SqliteDict
  from llm_studio.app_utils.config import default_cfg
  from llm_studio.app_utils.hugging_face_utils import get_model_card, publish_model_to_hugging_face
  from llm_studio.app_utils.sections.chat import chat_tab, load_cfg_model_tokenizer
  from llm_studio.app_utils.sections.common import clean_dashboard
  from llm_studio.app_utils.utils import add_model_type, flatten_dict, get_cfg_list_items, get_data_dir, get_download_link, get_experiment_status, get_experiments, get_model_types, get_problem_categories, get_problem_types, get_ui_elements, get_unique_name, hf_repo_friendly_name, parse_ui_elements, remove_model_type, set_env, start_experiment
  from llm_studio.app_utils.wave_utils import busy_dialog, ui_table_from_df, wave_theme
  from llm_studio.python_configs.cfg_checks import check_config_for_errors
  from llm_studio.src.datasets.text_utils import get_tokenizer
  from llm_studio.src.tooltips import tooltips
  from llm_studio.src.utils.config_utils import NON_GENERATION_PROBLEM_TYPES, load_config_py, load_config_yaml, save_config_yaml
  from llm_studio.src.utils.exceptions import LLMResourceException
  from llm_studio.src.utils.export_utils import check_available_space, get_artifact_path_path, get_logs_path, get_model_path, get_predictions_path, save_logs, save_prediction_outputs
  from llm_studio.src.utils.logging_utils import write_flag
  from llm_studio.src.utils.modeling_utils import unwrap_model
  from llm_studio.src.utils.plot_utils import PLOT_ENCODINGS
  from llm_studio.src.utils.utils import add_file_to_zip, kill_child_processes
label_desc: Use image node_id 7 for calling a global function with example usage: get_experiment_summary_code_card(cfg) and returns: text