code: def test_pad_sequences_vector():
      a = [[[1, 1]], [[2, 1], [2, 2]], [[3, 1], [3, 2], [3, 3]]]
  
      # test padding
      b = sequence.pad_sequences(a, maxlen=3, padding="pre")
      assert_allclose(
          b,
          [
              [[0, 0], [0, 0], [1, 1]],
              [[0, 0], [2, 1], [2, 2]],
              [[3, 1], [3, 2], [3, 3]],
          ],
      )
      b = sequence.pad_sequences(a, maxlen=3, padding="post")
      assert_allclose(
          b,
          [
              [[1, 1], [0, 0], [0, 0]],
              [[2, 1], [2, 2], [0, 0]],
              [[3, 1], [3, 2], [3, 3]],
          ],
      )
  
      # test truncating
      b = sequence.pad_sequences(a, maxlen=2, truncating="pre")
      assert_allclose(
          b, [[[0, 0], [1, 1]], [[2, 1], [2, 2]], [[3, 2], [3, 3]]]
      )
  
      b = sequence.pad_sequences(a, maxlen=2, truncating="post")
      assert_allclose(
          b, [[[0, 0], [1, 1]], [[2, 1], [2, 2]], [[3, 1], [3, 2]]]
      )
  
      # test value
      b = sequence.pad_sequences(a, maxlen=3, value=1)
      assert_allclose(
          b,
          [
              [[1, 1], [1, 1], [1, 1]],
              [[1, 1], [2, 1], [2, 2]],
              [[3, 1], [3, 2], [3, 3]],
          ],
      )
  
file_path: keras-preprocessing/tests/sequence_test.py
imports: from math import ceil
  import numpy
  import pytest
  from numpy.testing import assert_allclose, assert_equal, assert_raises
  from keras_preprocessing import sequence
label_desc: Use image node_id 3 for calling a global function with example usage: test_pad_sequences_vector() without return types