code: def test_pad_sequences(self):
      a = [[1], [1, 2], [1, 2, 3]]
  
      # test padding
      b = sequence_utils.pad_sequences(a, maxlen=3, padding="pre")
      self.assertAllClose(b, [[0, 0, 1], [0, 1, 2], [1, 2, 3]])
      b = sequence_utils.pad_sequences(a, maxlen=3, padding="post")
      self.assertAllClose(b, [[1, 0, 0], [1, 2, 0], [1, 2, 3]])
  
      # test truncating
      b = sequence_utils.pad_sequences(a, maxlen=2, truncating="pre")
      self.assertAllClose(b, [[0, 1], [1, 2], [2, 3]])
      b = sequence_utils.pad_sequences(a, maxlen=2, truncating="post")
      self.assertAllClose(b, [[0, 1], [1, 2], [1, 2]])
  
      # test value
      b = sequence_utils.pad_sequences(a, maxlen=3, value=1)
      self.assertAllClose(b, [[1, 1, 1], [1, 1, 2], [1, 2, 3]])
  
imports: from keras import testing
  from keras.utils import sequence_utils
label_desc: Use image node_id 1 for calling the PadSequencesTest obj's underlying member method code with example usage: obj.test_pad_sequences() without return types