code: def test_average_pooling_3d_double_backward(
      seed,
      inshape,
      kernel,
      stride,
      pad,
      ignore_border,
      channel_last,
      including_pad,
      ctx,
      func_name,
  ):
      from nbla_test_utils import (
          backward_function_tester,
          grad_function_forward_function_output,
      )
      from nnabla.backward_function.average_pooling import (
          AveragePoolingDataGrad,
      )
  
      if channel_last and not func_name.endswith("Cudnn"):
          pytest.skip("Channel last is only supported in Cudnn so far")
      if channel_last:
          t = refs.ChannelLastToFirstTranspose(
              len(inshape), len(kernel)
          )
          inshape = tuple(inshape[i] for i in t.inv_axes)
      rng = np.random.RandomState(seed)
      inputs = [rng.randn(*inshape).astype(np.float32)]
      func_args = [
          kernel,
          stride,
          ignore_border,
          pad,
          channel_last,
          including_pad,
      ]
      # 2nd-order
      backward_function_tester(
          rng,
          F.average_pooling,
          inputs=inputs,
          func_args=func_args,
          ctx=ctx,
          atol_f=1e-6,
          atol_accum=1e-2,
          non_accum_check=True,
      )
      # 3rd-order
      df, y = grad_function_forward_function_output(
          AveragePoolingDataGrad,
          F.average_pooling,
          ctx,
          inputs,
          *func_args,
      )
      df.xshape = inputs[0].shape
      ginputs = [rng.randn(*y.shape)]
      backward_function_tester(
          rng,
          df,
          inputs=ginputs,
          func_args=[],
          ctx=ctx,
          atol_f=1e-6,
          atol_accum=1e-2,
          non_accum_check=True,
      )
  
file_path: nnabla/python/test/function/test_average_pooling.py
imports: import pytest
  import numpy
  import nnabla.functions
  import refs
  from nbla_test_utils import list_context
label_desc: Use image node_id 7 for calling a global function with example usage: test_average_pooling_3d_double_backward(seed, inshape, kernel, stride, pad, ignore_border, channel_last, including_pad, ctx, func_name) without return types