

A value check


A tensor check


This becomes the heart of the code our "check_fn", which in turn is
evaluated the next time we encounter this code. It will then
check:


Is this code still valid?


If (1), Does "y" still have a type of "94367738391392"?


If (2), is "y" still 2?


If (3), letâs check on if tensor "x" changed in some specific ways.


If all of these are still true, then we can use the code cached
alongside this "check_fn".
Note:
For a deeper dive for how and where this happens you can read
  "static PyCodeObject lookup(CacheEntry e, PyObject *f_locals) {"
  of "_eval_frame.c".
If not, then, we can move on to recompiling the code anew, and storing
that in the cache alongside this code, and a whole new "check_fn",
again to be checked on yet another subsequent frame.
There are lots of other such functions on "GuardBuilder" which get
coalesced into, at times massive, strings which then get evaluated as
Python code and stored into "check_fn". The example above illustrates