code: def testInvalid(self):
      with self.cached_session():
          x = [[1, 2, 3], [4, 5, 6]]
          with self.assertRaisesRegex(
              ValueError,
              "Value of argument `mode` expected to be .* Received `mode` = WEIRD",
          ):
              self.evaluate(
                  array_ops.pad(x, [[1, 0], [2, 1]], mode="weird")
              )
  
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 15 for calling the PadOpTest obj's underlying member method code with example usage: obj.testInvalid() without return types