code: def const(value, dtype=None):
      """Construct a constant value for a given type.
  
      Parameters
      ----------
      value : int or float
          The input value
  
      dtype : str or None, optional
          The data type.
  
      Returns
      -------
      expr : Expr
          Constant expression corresponds to the value.
      """
      if dtype is None:
          dtype = _scalar_type_inference(value)
      return _api_internal._const(value, dtype)
  
imports: from numbers import Number, Integral
  from ..None import _api_internal
  from ..ndarray._internal import NDArrayBase
  from .object import _ObjectBase, PyNativeObject, _set_node_generic
  from .base import string_types
label_desc: Use image node_id 3 for calling a global function with example usage: const(value, dtype) and returns: _api_internal