code: def get_const_int(exp):
      """Verifies expr is integer and get the constant value.
  
      Parameters
      ----------
      exp : tvm.Expr or int
          The input expression.
  
      Returns
      -------
      out_value : int
          The output.
      """
      if isinstance(exp, int):
          return exp
      if not isinstance(exp, (expr.IntImm,)):
          ana = tvm.arith.Analyzer()
          exp = ana.simplify(exp)
      if not isinstance(exp, (expr.IntImm,)):
          raise ValueError("Expect value to be constant int")
      return exp.value
  
file_path: tvm/python/tvm/autotvm/utils.py
imports: import logging
  import time
  import numpy
  import tvm.arith
  from tvm.tir import expr
  from tvm.contrib.popen_pool import PopenPoolExecutor
label_desc: Use image node_id 4 for calling a global function with example usage: get_const_int(exp) and returns: exp, exp