code: def test_batch_normalization_double_backward(
      seed,
      axis,
      decay_rate,
      eps,
      output_stat,
      batch_stat,
      no_scale,
      no_bias,
      ctx,
      func_name,
  ):
      from nbla_test_utils import backward_function_tester
      from nnabla.backward_function.batch_normalization import (
          BatchNormalizationBackward,
      )
  
      rng = np.random.RandomState(seed)
      inputs = list(create_inputs(rng, axis))
      inputs = mask_vinputs(inputs, no_scale, no_bias, False, False)
  
      axes = [axis]
      func_args = [axes, decay_rate, eps, batch_stat, output_stat]
  
      insert_identity = []
      if batch_stat:
          insert_identity = [True, True, True, False, False]
  
      # 2nd-order
      backward_function_tester(
          rng,
          F.batch_normalization,
          inputs,
          func_args=func_args,
          backward=[True, not no_bias, not no_scale, False, False],
          ctx=ctx,
          atol_accum=1e-2,
          dstep=1e-3,
          insert_identity=insert_identity,
      )
      # # 3rd-order
      func_args = func_args[:-1] + [no_scale, no_bias]
      df = BatchNormalizationBackward(ctx, *func_args)
      ginputs = list(
          filter(
              lambda x: x is not None,
              [rng.randn(*inputs[0].shape)] + inputs,
          )
      )
      if not no_scale and not no_bias:
          backward = [True, True, False, True, False, False]
      else:
          backward = [True, True, False, False]
  
      backward_function_tester(
          rng,
          df,
          inputs=ginputs,
          func_args=[],
          backward=backward,
          ctx=ctx,
          atol_accum=1e-2,
          dstep=1e-3,
          non_accum_check=True,
      )
  
file_path: nnabla/python/test/function/test_batch_normalization.py
imports: from six.moves import range
  import pytest
  import numpy
  import nnabla
  import nnabla.functions
  from nbla_test_utils import list_context
  from nnabla.testing import assert_allclose
label_desc: Use image node_id 9 for calling a global function with example usage: test_batch_normalization_double_backward(seed, axis, decay_rate, eps, output_stat, batch_stat, no_scale, no_bias, ctx, func_name) without return types