code: def testNegativeAxis(self):
      params_1d = _MakeTestTensor(shape=[3])
      params_2d = _MakeTestTensor(shape=[3, 3])
      params_3d = _MakeTestTensor(shape=[3, 3, 3])
      indices = [2, 0, -1, 1, -1]
  
      gathered1a = pointer_ops.gather_with_default(
          params_1d, indices, "__", axis=0
      )
      gathered1b = pointer_ops.gather_with_default(
          params_1d, indices, "__", axis=-1
      )
      expected1 = [b"v2", b"v0", b"__", b"v1", b"__"]
  
      gathered2a = pointer_ops.gather_with_default(
          params_2d, indices, ["__", "__", "__"], axis=0
      )
      gathered2b = pointer_ops.gather_with_default(
          params_2d, indices, ["__", "__", "__"], axis=-2
      )
      expected2 = [
          [b"v20", b"v21", b"v22"],
          [b"v00", b"v01", b"v02"],
          [b"__", b"__", b"__"],
          [b"v10", b"v11", b"v12"],
          [b"__", b"__", b"__"],
      ]  # pyformat: disable
  
      gathered3a = pointer_ops.gather_with_default(
          params_2d, indices, "__", axis=1
      )
      gathered3b = pointer_ops.gather_with_default(
          params_2d, indices, "__", axis=-1
      )
      expected3 = [
          [b"v02", b"v00", b"__", b"v01", b"__"],
          [b"v12", b"v10", b"__", b"v11", b"__"],
          [b"v22", b"v20", b"__", b"v21", b"__"],
      ]  # pyformat: disable
  
      gathered4a = pointer_ops.gather_with_default(
          params_3d, indices, "__", axis=2
      )
      gathered4b = pointer_ops.gather_with_default(
          params_3d, indices, "__", axis=-1
      )
      expected4 = [
          [
              [b"v002", b"v000", b"__", b"v001", b"__"],
              [b"v012", b"v010", b"__", b"v011", b"__"],
              [b"v022", b"v020", b"__", b"v021", b"__"],
          ],
          [
              [b"v102", b"v100", b"__", b"v101", b"__"],
              [b"v112", b"v110", b"__", b"v111", b"__"],
              [b"v122", b"v120", b"__", b"v121", b"__"],
          ],
          [
              [b"v202", b"v200", b"__", b"v201", b"__"],
              [b"v212", b"v210", b"__", b"v211", b"__"],
              [b"v222", b"v220", b"__", b"v221", b"__"],
          ],
      ]
  
      self.assertAllEqual(gathered1a, expected1)
      self.assertAllEqual(gathered1b, expected1)
      self.assertAllEqual(gathered2a, expected2)
      self.assertAllEqual(gathered2b, expected2)
      self.assertAllEqual(gathered3a, expected3)
      self.assertAllEqual(gathered3b, expected3)
      self.assertAllEqual(gathered4a, expected4)
      self.assertAllEqual(gathered4b, expected4)
  
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 7 for calling the GatherWithDefaultOpTest obj's underlying member method code with example usage: obj.testNegativeAxis() without return types