code: def test_same_padding(self, kernel_size, stride, rate):
      a = tf.random.normal([2, 4, 3])
      k = tf.random.normal([kernel_size, 3, 4])
      padding = pad.create(pad.same, kernel_size, rate, 1, -1)
      a_padded = tf.pad(a, padding)
      y1 = tf.nn.conv1d(
          a_padded, k, stride=stride, dilations=rate, padding="VALID"
      )
      y2 = tf.nn.conv1d(
          a, k, stride=stride, dilations=rate, padding="SAME"
      )
      self.assertEqual(y1.shape, y2.shape)
      self.assertAllClose(y1.numpy(), y2.numpy())
  
file_path: sonnet/sonnet/src/pad_test.py
imports: from absl.testing import parameterized
  from sonnet.src import pad
  from sonnet.src import test_utils
  import tensorflow
label_desc: Use image node_id 10 for calling the PadTest obj's underlying member method code with example usage: obj.test_same_padding(kernel_size, stride, rate) without return types