code: def test_affine_forward_backward(
      seed, base_axis, weight_shape, bias, ctx, func_name
  ):
      from nbla_test_utils import function_tester
  
      rng = np.random.RandomState(seed)
      # Input
      inputs = [rng.randn(2, 3, 4).astype(np.float32)]
      # Weight
      inputs += [rng.randn(*weight_shape).astype(np.float32)]
      # Bias
      if bias:
          inputs += [rng.randn(*weight_shape[1:]).astype(np.float32)]
      else:
          inputs += [None]
      function_tester(
          rng,
          F.affine,
          ref_affine,
          inputs,
          func_args=[base_axis],
          atol_b=1e-2,
          dstep=1e-3,
          ctx=ctx,
          func_name=func_name,
      )
  
imports: import pytest
  import numpy
  import nnabla.functions
  from nbla_test_utils import list_context
label_desc: Use image node_id 2 for calling a global function with example usage: test_affine_forward_backward(seed, base_axis, weight_shape, bias, ctx, func_name) without return types