code: def test_convolution_2d_forward_backward(
      inshape,
      kernel,
      outmaps,
      pad,
      stride,
      dilation,
      group,
      with_bias,
      base_axis,
      seed,
      num_bits,
      inq_iterations,
      ctx,
      func_name,
  ):
      from nbla_test_utils import function_tester
  
      rng = np.random.RandomState(seed)
      # Input
      inputs = [rng.randn(*inshape).astype(np.float32)]
      # Weights
      inmaps = inshape[-3]
      kshape = (outmaps,) + (inmaps // group,) + kernel
      inputs += [rng.randn(*kshape).astype(np.float32)]
      # Indices
      inputs += [np.random.randint(2, size=kshape)]
      # Bias
      if with_bias:
          inputs += [rng.randn(outmaps).astype(np.float32)]
      else:
          inputs += [None]
  
      selection_algorithm = "largest_abs"
  
      function_tester(
          rng,
          F.inq_convolution,
          ref_inq_convolution,
          inputs,
          func_args=[
              base_axis,
              pad,
              stride,
              dilation,
              group,
              num_bits,
              inq_iterations,
              selection_algorithm,
              seed,
          ],
          atol_f=1e-5,
          atol_b=1e-2,
          atol_accum=1e-5,
          backward=[True, True, False, True],
          ctx=ctx,
          func_name=func_name,
          ref_grad=ref_grad_inq_convolution,
      )
  
file_path: nnabla/python/test/function/test_inq_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 4 for calling a global function with example usage: test_convolution_2d_forward_backward(inshape, kernel, outmaps, pad, stride, dilation, group, with_bias, base_axis, seed, num_bits, inq_iterations, ctx, func_name) without return types