code: def test_padding(backend_default, poolargs, deltas_buffer):
      fshape, nifm, padding, stride, in_sz, batch_size = poolargs
  
      NervanaObject.be.bsz = batch_size
  
      # basic sanity check with random inputs
      inshape = (nifm, in_sz, in_sz)
      insize = np.prod(inshape)
      neon_layer = Pooling(
          fshape=fshape, strides=stride, padding=padding
      )
  
      inp = neon_layer.be.array(np.random.random((insize, batch_size)))
      inp.lshape = inshape
      neon_layer.configure(inshape)
      neon_layer.prev_layer = True
      neon_layer.allocate()
  
      neon_layer.allocate_deltas(deltas_buffer)
      neon_layer.set_deltas(deltas_buffer)
      neon_layer.argmax = neon_layer.be.iobuf(
          neon_layer.outputs.shape[0], dtype=np.uint8
      )
  
      out = neon_layer.fprop(inp).get()
  
      ncheck = [0, batch_size // 2, batch_size - 1]
  
      (out_exp, check_inds) = ref_pooling(
          inp,
          inp.lshape,
          (fshape, fshape),
          padding,
          (stride, stride),
          neon_layer.be,
          ncheck=ncheck,
      )
  
      out_shape = list(out_exp.shape[0:3])
      out_shape.append(batch_size)
      outa = out.reshape(out_shape)
  
      assert allclose_with_out(
          out_exp, outa[:, :, :, check_inds], atol=0.0, rtol=0.0
      )
  
file_path: neon/tests/test_pool_layer.py
imports: import itertools
  import numpy
  from neon import NervanaObject
  from neon.layers.layer import Pooling
  from utils import allclose_with_out
label_desc: Use image node_id 3 for calling a global function with example usage: test_padding(backend_default, poolargs, deltas_buffer) without return types