code: def _pad_wrap(arr, pad_amt, axis=-1):
      """
      Pad `axis` of `arr` via wrapping.
  
      Parameters
      ----------
      arr : ndarray
          Input array of arbitrary shape.
      pad_amt : tuple of ints, length 2
          Padding to (prepend, append) along `axis`.
      axis : int
          Axis along which to pad `arr`.
  
      Returns
      -------
      padarr : ndarray
          Output array, with `pad_amt[0]` values prepended and `pad_amt[1]`
          values appended along `axis`. Both regions are padded wrapped values
          from the opposite end of `axis`.
  
      Notes
      -----
      This method of padding is also known as 'tile' or 'tiling'.
  
      The modes 'reflect', 'symmetric', and 'wrap' must be padded with a
      single function, lest the indexing tricks in non-integer multiples of the
      original shape would violate repetition in the final iteration.
  
      """
      # Implicit booleanness to test for zero (or None) in any scalar type
      if pad_amt[0] == 0 and pad_amt[1] == 0:
          return arr
  
      ##########################################################################
      # Prepended region
  
      # Slice off a reverse indexed chunk from near edge to pad `arr` before
      wrap_slice = _slice_last(arr.shape, pad_amt[0], axis=axis)
      wrap_chunk1 = arr[wrap_slice]
  
      ##########################################################################
      # Appended region
  
      # Slice off a reverse indexed chunk from far edge to pad `arr` after
      wrap_slice = _slice_first(arr.shape, pad_amt[1], axis=axis)
      wrap_chunk2 = arr[wrap_slice]
  
      # Concatenate `arr` with both chunks, extending along `axis`
      return np.concatenate((wrap_chunk1, arr, wrap_chunk2), 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 24 for calling a global function with example usage: _pad_wrap(arr, pad_amt, axis) and returns: np, arr