code: def reference_template(
      metric: str, language: str, reference: Dict[str, Any]
  ) -> str:
      """
      Get prompt template for GPT evaluation with reference.
  
      Different languages have different prompt templates.
  
      Args:
          metric: metric used in GPT evaluation with reference.
          language: language for the template.
          reference: the instruction that contains target answer.
  
      Returns:
          Prompt template for GPT evaluation with reference.
      """
  
      step_to_add = ref_step_template[language]
  
      for_the_given_answer = (
          "{metric} (1-5) (directly give the score for the given answer):"
          if language == "en"
          else "{metric} (1-5) (直接对给定答案打分)"
      )
  
      # adjective is used to describe the word "answer" in the prompt.
      adjective = "example" if language == "en" else "示例"
      answer_to_add = ref_answer_template_general[language]
  
      # Only for correctness, we will provide a correct answer and so the adjective for "answer" will be "correct". The prompt words will be "a correct answer".
      # In other cases, the prompt words will be "an example answer with good quality" by default.
      if metric.lower() == "correctness":
          adjective = "correct" if language == "en" else "标准"
          answer_to_add = ref_answer_template_correctness[language]
  
      answer_to_add = answer_to_add.format(
          answer=reference["target"]
          if reference["target"]
          else reference["output"]
      )
      step_to_add = step_to_add.format(
          metric=metric.lower(), adjective=adjective
      ) + for_the_given_answer.format(metric=metric)
  
      return answer_to_add + step_to_add
  
imports: import concurrent.futures
  import os
  import re
  import time
  from copy import deepcopy
  from typing import Any, Dict, List
  import matplotlib.pyplot
  import numpy
  import openai
  import pandas
  import seaborn
  import tqdm
  from colossal_eval.utils import jdump, jload
label_desc: Use image node_id 5 for calling a global function with example usage: reference_template(metric, language, reference) and returns: unknown