code: def raise_check(func, **kwds):
      try:
          with capture("stdout") as out:
              check(func, **kwds)
      except Exception:
          e = sys.exc_info()[1]
          raise AssertionError(str(e))
      else:
          assert "Traceback" not in out.getvalue()
      finally:
          out.close()
  
file_path: dill/dill/tests/test_check.py
imports: from dill import check
  import sys
  from dill.temp import capture
label_desc: Use image node_id 1 for calling a global function with example usage: raise_check(func) without return types