code: def main(
      eval_args: dict,
      description_dict_path: str = None,
      output_path: str = None,
  ):
      """Run evaluation and optionally save output.
  
      For a description of eval args, see `simple_evaluate`.
      """
      if description_dict_path:
          with open(description_dict_path, "r") as f:
              eval_args["description_dict"] = json.load(f)
  
      results = evaluator.simple_evaluate(**eval_args)
  
      dumped = json.dumps(results, indent=2, ensure_ascii=False)
      print(dumped)
  
      if output_path:
          os.makedirs(os.path.dirname(output_path), exist_ok=True)
          with open(output_path, "w") as f:
              f.write(dumped)
  
      return results
  
file_path: lm-evaluation-harness/main.py
imports: import os
  import argparse
  import json
  import logging
  import fnmatch
  from lm_eval import tasks, evaluator
label_desc: Use image node_id 4 for calling a global function with example usage: main(eval_args, description_dict_path, output_path) and returns: results