code: def resolve_var(source, loc, toks):
      try:
          return _ctx.get(toks[0])
      except KeyError:
          err = ExpressionError(
              "name '{}' is not defined".format(toks[0])
          )
          err.text = source
          err.offset = loc + 1
          raise err
  
imports: from collections import OrderedDict
  import functools
  import operator
  import re
  from typing import Mapping
  from pyparsing import Keyword, Word, oneOf, Literal, QuotedString, ParseException, Forward, Group, OneOrMore, ParseResults, Regex, ZeroOrMore, alphanums, pyparsing_common, replace_with
label_desc: Use image node_id 1 for calling a global function with example usage: resolve_var(source, loc, toks) and returns: _ctx