code: def check(s, frame=None):
      if frame is None:
          frame = sys._getframe(1)
          frame = py.code.Frame(frame)
      expr = parse(s, "eval")
      assert isinstance(expr, ast.Expression)
      node = Interpretable(expr.node)
      try:
          node.eval(frame)
      except passthroughex:
          raise
      except Failure:
          e = sys.exc_info()[1]
          report_failure(e)
      else:
          if not frame.is_true(node.result):
              sys.stderr.write(
                  "assertion failed: %s\n" % node.nice_explanation()
              )
  
imports: import py
  import sys, inspect
  from compiler import parse, ast, pycodegen
  from py._code.assertion import BuiltinAssertionError, _format_explanation
  import types
label_desc: Use image node_id 3 for calling a global function with example usage: check(s, frame) without return types