class_docstr: Representation of a script macro.
  
  This is a callable object, intended to be called from the expression evaluator.
  The evaluator is expected to insert the current parser into the environment
  undef the name given by "parser_object_name".
  
  Once called, the ScriptMacro object will locate the current parser, and use it
  to parse the macro's body and produce the result.
  
  There were two major considerations for this design:
  1. Implementing hygienic and non-hygienic macros.
  2. Implementing macros that return values.
  
  Macro uses in TIR are only allowed at a statement-level, and they don't produce
  any values. Parsing of such macros could easily be done by intercepting doc.Call
  nodes in the TIR parser. If a macro is a value-producing expression, then there
  may not be a direct way to intercept calls to it if it's embedded in a complex
  expression. Because macros use function-call syntax, the evaluator will try to
  call the macro object, which this design relies on to parse and evaluate the macro.
class_docstr_tok: ["Representation","of","a","script","macro",".","This","is","a","callable","object",",","intended","to","be","called","from","the","expression","evaluator",".","The","evaluator","is","expected","to","insert","the","current","parser","into","the","environment","undef","the","name","given","by","``","parser_object_name","''",".","Once","called",",","the","ScriptMacro","object","will","locate","the","current","parser",",","and","use","it","to","parse","the","macro","'s","body","and","produce","the","result",".","There","were","two","major","considerations","for","this","design",":","1",".","Implementing","hygienic","and","non-hygienic","macros",".","2",".","Implementing","macros","that","return","values",".","Macro","uses","in","TIR","are","only","allowed","at","a","statement-level",",","and","they","do","n't","produce","any","values",".","Parsing","of","such","macros","could","easily","be","done","by","intercepting","doc.Call","nodes","in","the","TIR","parser",".","If","a","macro","is","a","value-producing","expression",",","then","there","may","not","be","a","direct","way","to","intercept","calls","to","it","if","it","'s","embedded","in","a","complex","expression",".","Because","macros","use","function-call","syntax",",","the","evaluator","will","try","to","call","the","macro","object",",","which","this","design","relies","on","to","parse","and","evaluate","the","macro","."]
code: def __init__(
      self,
      source: Source,
      closure_vars: Dict[str, Any],
      func: Callable,
      hygienic: bool,
  ) -> None:
      self.source = source
      self.closure_vars = closure_vars
      self.func = func
      self.hygienic = hygienic
  
imports: import abc
  import inspect
  from collections import defaultdict
  from contextlib import contextmanager
  from typing import Any, Callable, Dict, List, Optional, Set, Union
  import numpy
  from tvm._ffi.base import TVMError
  from tvm.error import DiagnosticError
  from tvm.ir import GlobalVar
  from .None import dispatch, doc
  from .diagnostics import Diagnostics, Source
  from .evaluator import eval_assign, eval_expr
label_desc: Use image node_id 1 to create a new ScriptMacro object from inherited base classes: abc with example: obj = ScriptMacro(source, closure_vars, func, hygienic)