code: def test2DIndices(
      self, params, indices, default, expected_shape=None
  ):
      indices_t = constant_op.constant(indices, dtype=dtypes.int32)
      params_t = constant_op.constant(params)
      gathered = pointer_ops.gather_with_default(
          params_t, indices_t, default
      )
      expected = [
          [default if i == -1 else params[i] for i in indices_row]
          for indices_row in indices
      ]
      expected = constant_op.constant(expected, shape=expected_shape)
      self.assertAllEqual(gathered, expected)
      # When there are no -1 indices, check that behavior matches tf.gather.
      if not any(i == -1 for index_row in indices for i in index_row):
          self.assertAllEqual(
              gathered, array_ops.gather(params_t, indices_t)
          )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from absl.testing import parameterized
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import errors
  from tensorflow.python.framework import test_util
  from tensorflow.python.ops import array_ops
  from tensorflow.python.platform import test
  from tensorflow_text.python.ops import pointer_ops
label_desc: Use image node_id 5 for calling the GatherWithDefaultOpTest obj's underlying member method code with example usage: obj.test2DIndices(params, indices, default, expected_shape) without return types