code: def testUpperBoundInputsWrongRank(self):
      # Used to cause a segfault, b/266336058
      arg0 = array_ops.zeros([2, 1, 0], dtype=dtypes.float32)
      arg1 = array_ops.zeros([2, 3], dtype=dtypes.float32)
      with self.assertRaisesRegex(
          Exception, "Shape must be rank 2 but is rank 3"
      ):
          gen_array_ops.upper_bound(arg0, arg1)
  
imports: from tensorflow.core.config import flags
  from tensorflow.python.eager import backprop
  from tensorflow.python.eager import def_function
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import tensor_spec
  from tensorflow.python.framework import test_util
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import gen_array_ops
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops import random_ops
  from tensorflow.python.platform import test
label_desc: Use image node_id 9 for calling the ArrayOpTest obj's underlying member method code with example usage: obj.testUpperBoundInputsWrongRank() without return types