code: def testPaddedBatchDatasetNonDefaultPadding(self, padding_values):
      def fill_tuple(x):
          filled = array_ops.fill([x], x)
          return (
              filled,
              string_ops.as_string(filled),
              {"structure": string_ops.as_string(filled)},
          )
  
      random_seq_lens = np.random.randint(20, size=(32,)).astype(
          np.int32
      )
      dataset = (
          dataset_ops.Dataset.from_tensor_slices(random_seq_lens)
          .map(fill_tuple)
          .padded_batch(
              4,
              padded_shapes=([-1], [-1], {"structure": [-1]}),
              padding_values=padding_values,
          )
      )
  
      get_next = self.getNext(dataset)
      for i in range(8):
          result = self.evaluate(get_next())
          padded_len = np.max(result[0])
          self.assertEqual((4, padded_len), result[0].shape)
          self.assertEqual((4, padded_len), result[1].shape)
          self.assertEqual(
              (4, padded_len), result[2]["structure"].shape
          )
          for j in range(4):
              seq_len = random_seq_lens[(i * 4) + j]
              self.assertAllEqual(
                  result[0][j, :seq_len], [seq_len] * seq_len
              )
              self.assertAllEqual(
                  result[0][j, seq_len:], [-1] * (padded_len - seq_len)
              )
              self.assertAllEqual(
                  result[1][j, :seq_len],
                  [compat.as_bytes(str(seq_len))] * seq_len,
              )
              self.assertAllEqual(
                  result[1][j, seq_len:],
                  [b"<end>"] * (padded_len - seq_len),
              )
              self.assertAllEqual(
                  result[2]["structure"][j, :seq_len],
                  [compat.as_bytes(str(seq_len))] * seq_len,
              )
              self.assertAllEqual(
                  result[2]["structure"][j, seq_len:],
                  [b""] * (padded_len - seq_len),
              )
      with self.assertRaises(errors.OutOfRangeError):
          self.evaluate(get_next())
  
imports: from absl.testing import parameterized
  import numpy
  from tensorflow.python.data.kernel_tests import checkpoint_test_base
  from tensorflow.python.data.kernel_tests import test_base
  from tensorflow.python.data.ops import dataset_ops
  from tensorflow.python.data.ops import options
  from tensorflow.python.framework import combinations
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import errors
  from tensorflow.python.framework import sparse_tensor
  from tensorflow.python.framework import tensor_shape
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops import string_ops
  from tensorflow.python.ops.ragged import ragged_tensor_value
  from tensorflow.python.platform import test
  from tensorflow.python.util import compat
label_desc: Use image node_id 9 for calling the PaddedBatchTest obj's underlying member method code with example usage: obj.testPaddedBatchDatasetNonDefaultPadding(padding_values) and returns: filled,  string_ops,  dict