code: def make_table(result_dict):
      """Generate table of results."""
      from pytablewriter import MarkdownTableWriter, LatexTableWriter
  
      md_writer = MarkdownTableWriter()
      latex_writer = LatexTableWriter()
      md_writer.headers = [
          "Task",
          "Version",
          "Metric",
          "Value",
          "",
          "Stderr",
      ]
      latex_writer.headers = [
          "Task",
          "Version",
          "Metric",
          "Value",
          "",
          "Stderr",
      ]
  
      values = []
  
      for k, dic in result_dict["results"].items():
          version = result_dict["versions"][k]
          for m, v in dic.items():
              if m == "details":
                  continue
  
              if m.endswith("_stderr"):
                  continue
  
              if m + "_stderr" in dic:
                  se = dic[m + "_stderr"]
                  values.append(
                      [k, version, m, "%.4f" % v, "±", "%.4f" % se]
                  )
              else:
                  values.append([k, version, m, "%.4f" % v, "", ""])
              k = ""
              version = ""
      md_writer.value_matrix = values
      latex_writer.value_matrix = values
  
      # todo: make latex table look good
      # print(latex_writer.dumps())
  
      return md_writer.dumps()
  
file_path: lm-evaluation-harness/lm_eval/evaluator.py
imports: import collections
  import itertools
  import numpy
  import random
  import lm_eval.metrics
  import lm_eval.models
  import lm_eval.tasks
  import lm_eval.base
  from lm_eval.utils import positional_deprecated, run_task_tests
label_desc: Use image node_id 3 for calling a global function with example usage: make_table(result_dict) and returns: md_writer