code: def cal_ceval(res):
      acc_sum_dict = dict()
      acc_norm_sum_dict = dict()
      cnt_dict = dict()
      acc_sum = 0.0
      cnt = 0
      hard_cnt = 0
      hard_acc_sum = 0.0
      for tt in res.keys():
          name = tt.split("-")[-1]
          acc_sum += float(res[tt])
          cnt += 1
          class_ = TASK_NAME_MAPPING[name][2]
          if class_ not in acc_sum_dict:
              acc_sum_dict[class_] = 0.0
              acc_norm_sum_dict[class_] = 0.0
              cnt_dict[class_] = 0.0
          if name in hard_list:
              hard_cnt += 1
              hard_acc_sum += float(res[tt])
          acc_sum_dict[class_] += float(res[tt])
          cnt_dict[class_] += 1
      print("\n\n\n")
      for k in ["STEM", "Social Science", "Humanities", "Other"]:
          if k in cnt_dict:
              print(
                  "%s acc: %.2f " % (k, acc_sum_dict[k] / cnt_dict[k])
              )
      if hard_cnt > 0:
          print("Hard acc:%.2f " % (hard_acc_sum / hard_cnt))
      print("AVERAGE acc:%.2f " % (acc_sum / cnt))
  
file_path: BigDL/python/llm/dev/benchmark/ceval/eval.py
imports: import os
  import argparse
  import pandas
  import torch
  import json
  from tqdm import tqdm
  from bigdl.llm.utils.common.log4Error import invalidInputError
  from evaluators.qwen import QwenEvaluator
  from evaluators.llama import LlamaEvaluator
label_desc: Use image node_id 1 for calling a global function with example usage: cal_ceval(res) without return types