code: def _testPad(self, np_inputs, paddings, mode, constant_values):
      np_val = self._npPad(
          np_inputs,
          paddings,
          mode=mode,
          constant_values=constant_values,
      )
      for use_gpu in [True, False]:
          with test_util.device(use_gpu=use_gpu):
              tf_val = array_ops.pad(
                  np_inputs,
                  paddings,
                  mode=mode,
                  constant_values=constant_values,
              )
              out = self.evaluate(tf_val)
  
              if np_inputs.dtype in [
                  self._qint8,
                  self._quint8,
                  self._qint32,
              ]:
                  # Cast quantized types back to their numpy equivalents.
                  np_val = np_val.astype(np_inputs.dtype[0])
  
          self.assertAllEqual(np_val, out)
          self.assertShapeEqual(np_val, tf_val)
  
imports: import numpy
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import errors
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import test_util
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import gradient_checker_v2
  from tensorflow.python.platform import test
label_desc: Use image node_id 4 for calling the PadOpTest obj's underlying member method code with example usage: obj._testPad(np_inputs, paddings, mode, constant_values) without return types