code: def test_pad_constant_double_backward(
      seed, ctx, func_name, inshape, pad_width, constant_value
  ):
      from nbla_test_utils import (
          backward_function_tester,
          grad_function_forward_function_output,
      )
      from nnabla.backward_function.pad import PadDataGrad
  
      rng = np.random.RandomState(seed)
      inputs = [rng.randn(*inshape).astype(np.float32)]
      func_args = [pad_width, "constant", constant_value]
      # 2nd-order
      backward_function_tester(
          rng, F.pad, inputs, ctx=ctx, func_args=func_args
      )
  
      # 3rd-order
      # constant value is always zero after 1st-order derivative
      func_args = [pad_width, "constant", 0]
      df, y = grad_function_forward_function_output(
          PadDataGrad, F.pad, ctx, inputs, *func_args
      )
      df.xshape = inputs[0].shape
      ginputs = [rng.randn(*y.shape)]
      backward_function_tester(
          rng,
          df,
          ginputs,
          func_args=[],
          ctx=ctx,
          atol_f=1e-6,
          atol_accum=5e-2,
          non_accum_check=True,
      )
  
file_path: nnabla/python/test/function/test_pad.py
imports: import pytest
  import numpy
  import nnabla.functions
  from nbla_test_utils import list_context, function_tester
label_desc: Use image node_id 5 for calling a global function with example usage: test_pad_constant_double_backward(seed, ctx, func_name, inshape, pad_width, constant_value) without return types