code: def check(s, expected):
      frame = sys._getframe()
      caller = frame.f_back
      p = PyExprParser(s)
      t = p.parse()
      bad_subexpr = None
      try:
          t.eval(caller)
      except IncrEvalTrap as exc:
          bad_subexpr = str(exc.offending_expr)
      assert bad_subexpr == expected
  
file_path: tensor-sensor/testing/test_incr_eval.py
imports: from tsensor.ast import IncrEvalTrap
  from tsensor.parsing import PyExprParser
  import sys
  import numpy
  import torch
label_desc: Use image node_id 1 for calling a global function with example usage: check(s, expected) without return types