code: def verify_well_formed(
      obj: Union[PrimFunc, IRModule], assert_mode: bool = True
  ) -> bool:
      """Verify if the given TIR is well-formed. The verification includes:
          - Check if expressions not contain vars that is defined outside the block.
  
      Parameters
      ----------
      obj: Union[tvm.tir.PrimFunc, tvm.ir.IRModule]
          The function or module to be verified.
  
      assert_mode: bool
          The indicator if it raises an error when the function is not well-formed.
  
      Returns
      -------
      result: bool
          Whether it is a well-formed TIR function.
      """
      return _ffi_api.VerifyWellFormed(obj, assert_mode)
  
imports: from typing import Dict, List, Optional, Union
  import tvm
  from tvm import Object
  from tvm.ir import IRModule
  from tvm.tir.expr import Var
  from tvm.tir.stmt import Block, BufferRegion, PrimExpr
  from ..None import Buffer, Stmt
  from ..function import PrimFunc
  from .None import _ffi_api
label_desc: Use image node_id 15 for calling a global function with example usage: verify_well_formed(obj, assert_mode) and returns: _ffi_api