class_docstr: IRModule that holds functions and type definitions.
  
  IRModule is the basic unit for all IR transformations across the stack.
  
  Parameters
  ----------
  functions: Optional[dict].
      Map of global var to BaseFunc
class_docstr_tok: ["IRModule","that","holds","functions","and","type","definitions",".","IRModule","is","the","basic","unit","for","all","IR","transformations","across","the","stack",".","Parameters","--","--","--","--","--","functions",":","Optional","[","dict","]",".","Map","of","global","var","to","BaseFunc"]
code: def _add(self, var, val, update=True):
      if isinstance(val, _expr.RelayExpr):
          if isinstance(var, string_types):
              if _ffi_api.Module_ContainGlobalVar(self, var):
                  var = _ffi_api.Module_GetGlobalVar(self, var)
              else:
                  var = _expr.GlobalVar(var)
          _ffi_api.Module_Add(self, var, val, update)
      else:
          assert isinstance(val, _ty.Type)
          if isinstance(var, string_types):
              var = _ty.GlobalTypeVar(var)
          _ffi_api.Module_AddDef(self, var, val, update)
  
imports: import tvm._ffi
  from tvm._ffi.base import string_types
  from tvm.runtime import Scriptable
  from .None import _ffi_api
  from .None import expr
  from .None import type
  from .base import Node
label_desc: Use image node_id 3 for calling the IRModule obj's underlying member method code with example usage: obj._add(var, val, update) without return types