code: def lookup(name, frame, locals):
      """Find the value for a given name in the given environment."""
      if name in locals:
          return "local", locals[name]
      if name in frame.f_globals:
          return "global", frame.f_globals[name]
      if "__builtins__" in frame.f_globals:
          builtins = frame.f_globals["__builtins__"]
          if type(builtins) is type({}):
              if name in builtins:
                  return "builtin", builtins[name]
          else:
              if hasattr(builtins, name):
                  return "builtin", getattr(builtins, name)
      return None, __UNDEF__
  
imports: import inspect
  import keyword
  import linecache
  import os
  import pydoc
  import sys
  import tempfile
  import time
  import tokenize
  import traceback
  import warnings
  from html import escape
label_desc: Use image node_id 5 for calling a global function with example usage: lookup(name, frame, locals) and returns: None,  __UNDEF__, str,  locals, str,  frame, str,  builtins, str,  getattr