code: def test_code_coverage(
      identifier: str,
      code: str,
      inputs: List[List[Any]],
      entry_point: str,
  ):
      module_name = f"tmp_src_{identifier}"
      with open(f"{module_name}.py", "w") as f:
          f.write(code)
  
      mod = import_module(module_name)
      func = getattr(mod, entry_point, None)
      assert (
          func != None
      ), f"entry_point = {entry_point} not exist, code: {code}"
  
      cov = coverage.Coverage(branch=True)
      cov.start()
      with swallow_io():
          for input_list in inputs:
              func(*input_list)
      cov.stop()
      with Capturing() as outputs:
          cov.lcov_report(outfile="-")
  
      ret = parse_lcov(outputs)
  
      os.remove(f"{module_name}.py")
      return ret
  
file_path: evalplus/tools/tsr/coverage_init.py
imports: import os
  import pickle
  import sys
  from importlib import import_module
  from io import StringIO
  from typing import Any, Dict, List
  import coverage
  from rich.progress import track
  from evalplus.eval.utils import swallow_io
  from tools.tsr.utils import get_problems, get_task_ids, to_path
label_desc: Use image node_id 2 for calling a global function with example usage: test_code_coverage(identifier, code, inputs, entry_point) and returns: ret