code: def get_const_int(exp):
      """Verifies expr is integer and get the constant value.
  
      Parameters
      ----------
      exp : Union[tvm.tir.expr, int]
          The input expression.
  
      Returns
      -------
      out_value : int
          The output.
      """
      if isinstance(exp, int):
          return exp
      if not isinstance(exp, expr.IntImm):
          opt = Sequential([Simplify()])
          exp = opt(exp)
      if not isinstance(exp, expr.IntImm):
          raise ValueError("Expect value to be constant int")
      return exp.value
  
imports: from typing import Hashable
  import json
  import signal
  import threading
  import traceback
  import os
  import numpy
  import tvm
  from tvm import rpc
  from tvm.tir import expr
  from tvm.tir.transform import Simplify
  from tvm.ir.transform import Sequential
  from ..te import Tensor, placeholder
label_desc: Use image node_id 4 for calling a global function with example usage: get_const_int(exp) and returns: exp, exp