code: def testErrorIndexOutOfRange(self):
      # GPU kernels don't throw exceptions.
      with self.cached_session(use_gpu=False):
          data = constant_op.constant(
              [
                  [0, 1, 2],
                  [3, 4, 5],
                  [6, 7, 8],
                  [9, 10, 11],
                  [12, 13, 14],
              ]
          )
          indices = constant_op.constant([0, 2, 99, 2, 2])
          partitions = data_flow_ops.dynamic_partition(
              data, indices, num_partitions=4
          )
          with self.assertRaisesOpError(
              r"partitions\[2\] = 99 is not in \[0, 4\)"
          ):
              self.evaluate(partitions)
  
imports: import unittest
  from absl.testing import parameterized
  import numpy
  from tensorflow.python.framework import config
  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.ops import data_flow_ops
  from tensorflow.python.ops import gradients_impl
  import tensorflow.python.ops.data_flow_grad
  from tensorflow.python.platform import test
label_desc: Use image node_id 14 for calling the DynamicPartitionTest obj's underlying member method code with example usage: obj.testErrorIndexOutOfRange() without return types