code: def test_reduction_forward_backward(
      op, seed, inshape, axis, keepdims, ctx, func_name
  ):
      func = getattr(F, op)
      ref_func = getattr(np, op)
      rng = np.random.RandomState(seed)
      inputs = [rng.randn(*inshape).astype(np.float32)]
      function_tester(
          rng,
          func,
          ref_func,
          inputs,
          func_args=[axis],
          func_kwargs=dict(keepdims=keepdims),
          ctx=ctx,
          func_name=func_name,
          # The backward test on macOS doesn't pass with this tolerance.
          # Does Eigen library used in CPU computation backend produce
          # the different results on different platforms?
          # atol_b=3e-3,
          atol_b=6e-3,
      )
  
file_path: nnabla/python/test/function/test_reduction.py
imports: import pytest
  import numpy
  import nnabla
  import nnabla.functions
  from nnabla.testing import assert_allclose
  from nbla_test_utils import function_tester, list_context, list_ctx_and_func_name
label_desc: Use image node_id 1 for calling a global function with example usage: test_reduction_forward_backward(op, seed, inshape, axis, keepdims, ctx, func_name) without return types