def METHOD_NAME(batch_first, shapes, seed, ctx, func_name):
    from nbla_test_utils import function_tester
    rng = np.random.RandomState(seed)
    sequences = [rng.randn(*shape).astype(np.float32) for shape in shapes]
    padded_sequence = pad_sequence(sequences, batch_first)
    lengths = np.array([seq.shape[0] for seq in sequences])
    inputs = [padded_sequence, lengths]
    func_args = [batch_first]
    insert_identity = [True, False]
    function_tester(rng, F.pack_padded_sequence, ref_pack_padded_sequence, inputs,
                    ctx=ctx, func_name=func_name, func_args=func_args,
                    backward=[True, False], disable_half_test=False,
                    atol_f=1e-3, atol_b=1e-2, insert_identity=insert_identity)