code: def mergesum_test_config(be, modfunc, use_stride=1):
      l1 = Conv(**conv_params(3, 16))
      neon_layer = modfunc(16, use_stride)
      inshape = (16, 32, 32)
      insize = np.prod(inshape)
      inpa = np.random.random((insize, batch_size))
  
      neon_seq = Sequential([l1] + neon_layer)
      neon_seq.configure(inshape)
      inp = be.array(inpa)
  
      neon_seq.allocate()
      # neon_layer.layers[0].prev_layer = True
  
      neon_seq.allocate_deltas()
  
      neon_out = neon_seq.fprop(inp).get()
  
      # Now make the reference pathways:
      p1, p2 = module_factory_copy(neon_layer, modfunc, 16, use_stride)
      l11 = Conv(**conv_params(3, 16))
      l12 = Conv(**conv_params(3, 16))
  
      for ll in (l11, l12):
          for lcopy, lref in zip(ll, l1):
              if lcopy.has_params:
                  lcopy.set_params(lref.get_params_serialize())
  
      path1 = Sequential([l11] + p1)
      path2 = Sequential([l12] + p2)
      for ll in (path1, path2):
          ll.configure(inshape)
          ll.allocate()
          ll.allocate_deltas()
  
      o1 = path1.fprop(inp)
      o2 = path2.fprop(inp)
      # convert mkl buffer to cpu for following cpu execution
      be.convert_data(o1, False)
      be.convert_data(o2, False)
      neon_out_ref = be.empty_like(o1)
      neon_out_ref[:] = be.maximum(o1 + o2, 0)
  
      # need to have bsum false for this test to be valid
      assert allclose_with_out(neon_out_ref.get(), neon_out, rtol=0)
      erra = np.random.random(neon_out.shape)
      err = be.array(erra)
  
      ebr = neon_seq.layers[-1].bprop(err)
      ebr = neon_seq.layers[-2].bprop(ebr)
      trunk_neon = ebr.get()
  
      err = be.array(erra)
      err[:] = be.greater(neon_out_ref, 0) * err
  
      pstart = len(l1)
      eb1 = err
      for l in reversed(path1.layers[pstart:]):
          eb1 = l.bprop(eb1)
  
      eb2 = err
      for l in reversed(path2.layers[pstart:]):
          eb2 = l.bprop(eb2)
  
      be.convert_data(eb1, False)
      be.convert_data(eb2, False)
      err_ref = be.empty_like(eb1)
      err_ref[:] = eb1 + eb2
  
      assert allclose_with_out(err_ref.get(), trunk_neon, rtol=0)
  
file_path: neon/tests/test_mergesum_layer.py
imports: from builtins import zip
  import numpy
  from neon import NervanaObject
  from neon.layers import Sequential, Conv, MergeSum, SkipNode, Activation
  from neon.initializers.initializer import Gaussian, IdentityInit
  from neon.transforms import Rectlin
  from utils import allclose_with_out
label_desc: Use image node_id 9 for calling a global function with example usage: mergesum_test_config(be, modfunc, use_stride) without return types