code: def get_query_str(
      question, options, choices_templates=CHOICE_TEMP, pad=True
  ):
      # {'questions': 'what is xxx?\n', options: ['aaa', 'bbb', 'ccc', 'ddd'], ...}
      # --> 'what is xxx?\nA. aaa\nB. bbb\nC. ccc\nD. ddd\n'
      query = question if question.endswith("\n") else question + "\n"
      num_choices = len(choices_templates)
  
      choices = []
      for idx, option in enumerate(options):
          choices.append(
              choices_templates[idx].format(option + "\n")
          )  # e.g. "A. xxxx\n", "B. xxxx\n", ...
      remain_choice = num_choices - len(choices)
      if (
          pad and remain_choice > 0
      ):  # use NULL choice to pad choices to max choices number
          fake_choice = "NULL"
          for i in range(num_choices - remain_choice, num_choices):
              choices.append(
                  choices_templates[i].format(fake_choice + "\n")
              )
      query += "".join(choices)
      query = INPUT_FORMAT.format(query)
      return query
  
file_path: ColossalAI/applications/ColossalEval/colossal_eval/dataset/safetybench_en.py
imports: import json
  import os
  from copy import deepcopy
  from typing import Dict, List
  from colossalai.logging import DistributedLogger
  from .base import BaseDataset
label_desc: Use image node_id 1 for calling a global function with example usage: get_query_str(question, options, choices_templates, pad) and returns: query