code: def _concat_arrays_with_padding(arrays, padding):
      shape = numpy.array(arrays[0].shape, dtype=int)
      for array in arrays[1:]:
          if numpy.any(shape != array.shape):
              numpy.maximum(shape, array.shape, shape)
      shape = tuple(numpy.insert(shape, 0, len(arrays)))
  
      device = backend.get_device_from_array(arrays[0])
      with chainer.using_device(device):
          result = device.xp.full(shape, padding, dtype=arrays[0].dtype)
          for i in six.moves.range(len(arrays)):
              src = arrays[i]
              slices = tuple(slice(dim) for dim in src.shape)
              result[(i,) + slices] = src
  
      return result
  
imports: import collections
  import numpy
  import six
  import chainer
  from chainer import backend
  from chainer.backends import cuda
label_desc: Use image node_id 7 for calling a global function with example usage: _concat_arrays_with_padding(arrays, padding) and returns: result