code: def ref_sum_pooling_3d(x, kernel, stride, ignore_border, pad):
      y = []
      for xx in x.reshape((-1,) + x.shape[-4:]):
          if xx.ndim == 3:
              xx = xx[np.newaxis]
          y += [
              refs.pooling_3d(
                  xx, "sum", kernel, stride, pad, ignore_border
              )[np.newaxis]
          ]
      y = np.vstack(y)
      if x.ndim == 3:
          y = np.squeeze(y, 1)
      return y.reshape(x.shape[:-4] + y.shape[1:])
  
file_path: nnabla/python/test/function/test_sum_pooling.py
imports: import pytest
  import numpy
  import nnabla.functions
  import refs
  from nbla_test_utils import list_context
label_desc: Use image node_id 2 for calling a global function with example usage: ref_sum_pooling_3d(x, kernel, stride, ignore_border, pad) and returns: y