code: def _append_const(arr, pad_amt, val, axis=-1):
      """
      Append constant `val` along `axis` of `arr`.
  
      Parameters
      ----------
      arr : ndarray
          Input array of arbitrary shape.
      pad_amt : int
          Amount of padding to append.
      val : scalar
          Constant value to use. For best results should be of type `arr.dtype`;
          if not `arr.dtype` will be cast to `arr.dtype`.
      axis : int
          Axis along which to pad `arr`.
  
      Returns
      -------
      padarr : ndarray
          Output array, with `pad_amt` constant `val` appended along `axis`.
  
      """
      if pad_amt == 0:
          return arr
      padshape = tuple(
          x if i != axis else pad_amt for (i, x) in enumerate(arr.shape)
      )
      return _do_append(
          arr, np.full(padshape, val, dtype=arr.dtype), axis
      )
  
imports: from __future__ import division, absolute_import, print_function
  import numpy
  from numpy.core.overrides import array_function_dispatch
label_desc: Use image node_id 9 for calling a global function with example usage: _append_const(arr, pad_amt, val, axis) and returns: _do_append, arr