code: def ref_convolution(
      x, w, b, base_axis, pad, stride, dilation, group, quantize_zero_to
  ):
      y = []
      for xx in x.reshape((-1,) + x.shape[base_axis:]):
          y += [
              refs.convolution_2d(
                  xx, w, b, pad, stride, dilation, group
              )[np.newaxis]
          ]
      y = np.vstack(y)
      return y.reshape(x.shape[:base_axis] + y.shape[1:])
  
file_path: nnabla/python/test/function/test_binary_connect_convolution.py
imports: from __future__ import division
  import pytest
  import numpy
  import nnabla
  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_convolution(x, w, b, base_axis, pad, stride, dilation, group, quantize_zero_to) and returns: y