code: def test_unpooling_double_backward(
      seed, inshape, kernel, channel_last, ctx, func_name
  ):
      if channel_last and func_name == "Unpooling":
          pytest.skip(
              "Unpooling with channel_last is only supported in CUDA."
          )
      if channel_last and len(inshape) == len(kernel):
          pytest.skip(
              "len(input shape) == len(kernel) is only valid for the channel first."
          )
  
      from nbla_test_utils import (
          backward_function_tester,
          grad_function_forward_function_output,
      )
      from nnabla.backward_function.unpooling import UnpoolingDataGrad
  
      rng = np.random.RandomState(seed)
      inputs = [rng.randn(*inshape).astype(np.float32)]
      func_args = [kernel, channel_last]
      # 2nd-order
      backward_function_tester(
          rng, F.unpooling, inputs=inputs, func_args=func_args, ctx=ctx
      )
      # 3rd-order
      df, y = grad_function_forward_function_output(
          UnpoolingDataGrad, F.unpooling, ctx, inputs, *func_args
      )
      df.xshape = inputs[0].shape
      ginputs = [rng.randn(*y.shape)]
      backward_function_tester(
          rng, df, inputs=ginputs, ctx=ctx, non_accum_check=True
      )
  
file_path: nnabla/python/test/function/test_unpooling.py
imports: import pytest
  import numpy
  import nnabla.functions
  import refs
  from nbla_test_utils import list_context
label_desc: Use image node_id 3 for calling a global function with example usage: test_unpooling_double_backward(seed, inshape, kernel, channel_last, ctx, func_name) without return types