code: def testBadIndicesCPU(self):
      with ops.device_v2("cpu:0"):
          params = [[0, 1, 2], [3, 4, 5]]
          with self.assertRaisesOpError(
              r"indices\[0\] = 7 is not in \[0, 2\)"
          ):
              self.evaluate(array_ops.batch_gather(params, [7]))
  
file_path: tensorflow-upstream/tensorflow/python/kernel_tests/array_ops/batch_gather_op_test.py
imports: from absl.testing import parameterized
  import numpy
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import test_util
  from tensorflow.python.ops import array_ops
  from tensorflow.python.platform import test
label_desc: Use image node_id 7 for calling the GatherTest obj's underlying member method code with example usage: obj.testBadIndicesCPU() without return types