code: def _append_ramp(arr, pad_amt, end, axis=-1):
      """
      Append linear ramp along `axis`.
  
      Parameters
      ----------
      arr : ndarray
          Input array of arbitrary shape.
      pad_amt : int
          Amount of padding to append.
      end : scalar
          Constal 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` values appended along `axis`. The
          appended region ramps linearly from the edge value to `end`.
  
      """
      if pad_amt == 0:
          return arr
  
      # Slice a chunk from the edge to calculate stats on and extract edge
      edge_slice = _slice_last(arr.shape, 1, axis=axis)
      edge = arr[edge_slice]
  
      ramp_arr = np.linspace(
          start=end,
          stop=edge.squeeze(axis),
          num=pad_amt,
          endpoint=False,
          dtype=arr.dtype,
          axis=axis,
      )
      # Reverse linear space in appropriate dimension
      ramp_arr = ramp_arr[
          _slice_at_axis(ramp_arr.shape, slice(None, None, -1), axis)
      ]
  
      return _do_append(arr, ramp_arr, 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 13 for calling a global function with example usage: _append_ramp(arr, pad_amt, end, axis) and returns: _do_append, arr