code: def check_defined(var_names):
      "check whether the global var names are defined"
      l = get_callers_locals()
      for v in var_names:
          assert v in l, f"var {v} should exist in locals()"
  
imports: import numpy
  import torch
  import re, gc
  from math import isclose
  import inspect
label_desc: Use image node_id 8 for calling a global function with example usage: check_defined(var_names) without return types