code: def test_pad_packed_sequence_forward_backward(
      total_length,
      padding_value,
      batch_first,
      batch_sizes,
      Ds,
      seed,
      ctx,
      func_name,
  ):
      from nbla_test_utils import function_tester
  
      rng = np.random.RandomState(seed)
      packed_sequence = rng.randn(*((sum(batch_sizes),) + Ds)).astype(
          np.float32
      )
      batch_sizes = np.array(batch_sizes)
      inputs = [packed_sequence, batch_sizes]
      func_args = [batch_first, padding_value, total_length]
      insert_identity = [True, False]
      function_tester(
          rng,
          F.pad_packed_sequence,
          ref_pad_packed_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,
      )
  
file_path: nnabla/python/test/function/test_pad_packed_sequence.py
imports: import pytest
  import numpy
  import nnabla.functions
  from nbla_test_utils import list_context
  from refs import pad_sequence
label_desc: Use image node_id 3 for calling a global function with example usage: test_pad_packed_sequence_forward_backward(total_length, padding_value, batch_first, batch_sizes, Ds, seed, ctx, func_name) without return types