code: def test_pow2_quantize_forward_backward(
      seed,
      sign,
      with_zero,
      n,
      m,
      quantize,
      ste_fine_grained,
      ctx,
      func_name,
  ):
      from nbla_test_utils import cap_ignore_region, function_tester
  
      rng = np.random.RandomState(seed)
      inputs = [
          cap_ignore_region(
              rng.randn(2, 3, 4).astype(np.float32) * 2, (-1e-3, 1e-3)
          )
      ]
      if quantize:
          func_args = [
              sign,
              with_zero,
              n,
              m,
              quantize,
              ste_fine_grained,
          ]
          function_tester(
              rng,
              F.pow2_quantize,
              ref_pow2_quantize,
              inputs,
              func_args=func_args,
              atol_b=1e-3,
              backward=[True],
              ctx=ctx,
              func_name=func_name,
              ref_grad=ref_grad_pow2_quantize,
          )
  
      else:  # No quantize
          for i in inputs:
              v = nn.Variable(i.shape)
              v.d = i
              v.g = np.random.randn(*i.shape)
              o = F.pow2_quantize(v)
              o.forward()
              o.backward()
              np.allclose(v.d, o.d)
              np.allclose(v.g, o.g)
  
file_path: nnabla/python/test/function/test_pow2_quantize.py
imports: import pytest
  import numpy
  import nnabla
  import nnabla.functions
  from nbla_test_utils import list_context
label_desc: Use image node_id 3 for calling a global function with example usage: test_pow2_quantize_forward_backward(seed, sign, with_zero, n, m, quantize, ste_fine_grained, ctx, func_name) without return types