code: def process_test(sample_list, pad_choices=False):
      test_dict = {}
      for sample in sample_list:
          num_options = len(sample["options"])
          category = sample["category"]
          inference_kwargs = deepcopy(default_inference_kwargs)
          if not pad_choices:
              category += "_{}".format(num_options)
              inference_kwargs["all_classes"] = inference_kwargs[
                  "all_classes"
              ][:num_options]
          if category not in test_dict:
              test_dict[category] = {
                  "data": [],
                  "inference_kwargs": inference_kwargs,
              }
          question = sample["question"]
          options = sample["options"]
          query_str = get_query_str(question, options, pad=pad_choices)
          data_sample = {
              "dataset": EVAL_NAME,
              "split": "test",
              "category": category,
              "instruction": INST,
              "input": query_str,
              "output": "",
              "target": "",
              "id": sample["id"],
          }
          test_dict[category]["data"].append(data_sample)
      return test_dict
  
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 2 for calling a global function with example usage: process_test(sample_list, pad_choices) and returns: test_dict