code: def _unpad(array, width):
      if anp.isscalar(width):
          width = [[width, width]]
      elif anp.shape(width) == (1,):
          width = [anp.concatenate((width, width))]
      elif anp.shape(width) == (2,):
          width = [width]
      if anp.shape(width)[0] == 1:
          width = anp.repeat(width, anp.ndim(array), 0)
      idxs = tuple(slice(l, -u or None) for l, u in width)
      return array[idxs]
  
imports: from __future__ import absolute_import
  from six import string_types
  from functools import partial
  import numpy
  from ..util import func
  from .None import numpy_wrapper
  from .numpy_boxes import ArrayBox
  from autograd.extend import primitive, vspace, defvjp, defvjp_argnum, SparseObject, VJPNode, register_notrace
label_desc: Use image node_id 47 for calling a global function with example usage: _unpad(array, width) and returns: array