code: def test_affine_double_backward(
      seed, base_axis, weight_shape, bias, ctx, func_name
  ):
      from nbla_test_utils import (
          backward_function_tester,
          grad_function_forward_function_output,
      )
      from nnabla.backward_function.affine import (
          AffineDataGrad,
          AffineFilterGrad,
      )
  
      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) * 1e2
          ]
      else:
          inputs += [None]
      func_args = [base_axis]
      # Affine
      backward_function_tester(
          rng,
          F.affine,
          inputs,
          func_args=func_args,
          dstep=1e-3,
          ctx=ctx,
      )
      # DataGrad
      df, y = grad_function_forward_function_output(
          AffineDataGrad, F.affine, ctx, inputs, *func_args
      )
      df.xshape = inputs[0].shape
      ginputs = [rng.randn(*y.shape), inputs[1]]
      backward_function_tester(
          rng,
          df,
          ginputs,
          func_args=[],
          atol_accum=2e-2,
          dstep=1e-3,
          ctx=ctx,
          non_accum_check=True,
      )
  
      # FilterGrad
      df, y = grad_function_forward_function_output(
          AffineFilterGrad, F.affine, ctx, inputs, *func_args
      )
      df.wshape = inputs[1].shape
      ginputs = [rng.randn(*y.shape), inputs[0]]
      backward_function_tester(
          rng,
          df,
          ginputs,
          func_args=[],
          dstep=1e-3,
          ctx=ctx,
          non_accum_check=True,
      )
  
imports: import pytest
  import numpy
  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_affine_double_backward(seed, base_axis, weight_shape, bias, ctx, func_name) without return types