code: def main():
      lm = DryrunLM()
  
      task_list = "arc_challenge,arc_easy,boolq,cola,copa,headqa,hellaswag,lambada,logiqa,mathqa,mc_taco,mrpc,multirc,openbookqa,piqa,prost,pubmedqa,qnli,qqp,race,record,rte,sciq,sst,triviaqa,webqs,wic,wikitext,winogrande,wnli,wsc"
      values = []
      for taskname in task_list.split(","):
          lm.tokencost = 0
          evaluator.evaluate(
              lm=lm,
              task_dict={taskname: tasks.get_task(taskname)()},
              num_fewshot=0,
              limit=None,
              bootstrap_iters=10,
              description_dict=None,
          )
  
          print(taskname, lm.tokencost)
          values.append(
              [
                  taskname,
                  lm.tokencost,
                  lm.tokencost / 1000 * 0.0008,
                  lm.tokencost / 1000 * 0.0012,
                  lm.tokencost / 1000 * 0.006,
                  lm.tokencost / 1000 * 0.06,
              ]
          )
      from pytablewriter import MarkdownTableWriter
  
      writer = MarkdownTableWriter()
      writer.headers = [
          "Task",
          "Tokens",
          "Ada",
          "Babbage",
          "Curie",
          "Davinci",
      ]
  
      values.sort(key=lambda x: -x[1])
      totcost = sum([x[1] for x in values])
      values.append(
          [
              "**Total**",
              totcost,
              totcost / 1000 * 0.0008,
              totcost / 1000 * 0.0012,
              totcost / 1000 * 0.006,
              totcost / 1000 * 0.06,
          ]
      )
  
      writer.value_matrix = values
  
      print(writer.dumps())
  
file_path: lm-evaluation-harness/scripts/cost_estimate.py
imports: import random
  import transformers
  from lm_eval import tasks, evaluator
  from lm_eval.base import LM
label_desc: Use image node_id 1 for calling a global function with example usage: main() without return types