code: def _append_edge(arr, pad_amt, axis=-1):
      """
      Append `pad_amt` to `arr` along `axis` by extending edge values.
  
      Parameters
      ----------
      arr : ndarray
          Input array of arbitrary shape.
      pad_amt : int
          Amount of padding to append.
      axis : int
          Axis along which to pad `arr`.
  
      Returns
      -------
      padarr : ndarray
          Output array, extended by `pad_amt` edge values prepended along
          `axis`.
  
      """
      if pad_amt == 0:
          return arr
  
      edge_slice = _slice_last(arr.shape, 1, axis=axis)
      edge_arr = arr[edge_slice]
      return _do_append(arr, edge_arr.repeat(pad_amt, axis=axis), 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 11 for calling a global function with example usage: _append_edge(arr, pad_amt, axis) and returns: _do_append, arr