code: def make_report(
      test_args,
      source_dir="sympy/",
      report_dir="covhtml",
      use_cache=False,
      slow=False,
  ):
      # code adapted from /bin/test
      from get_sympy import path_hack
  
      sympy_top = path_hack()
      os.chdir(sympy_top)
  
      cov = coverage.coverage()
      cov.exclude("raise NotImplementedError")
      cov.exclude("def canonize")  # this should be "@decorated"
      if use_cache:
          cov.load()
      else:
          cov.erase()
          cov.start()
          import sympy
  
          sympy.test(*test_args, subprocess=False, slow=slow)
          # sympy.doctest()  # coverage doesn't play well with doctests
          cov.stop()
          try:
              cov.save()
          except PermissionError:
              import warnings
  
              warnings.warn(
                  "PermissionError has been raised while saving the "
                  "coverage result.",
                  RuntimeWarning,
              )
  
      covered_files = list(generate_covered_files(source_dir))
      cov.html_report(morfs=covered_files, directory=report_dir)
  
imports: from __future__ import print_function
  import os
  import re
  import sys
  from argparse import ArgumentParser
label_desc: Use image node_id 2 for calling a global function with example usage: make_report(test_args, source_dir, report_dir, use_cache, slow) without return types