def METHOD_NAME(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)