code: def _testClipIndexedSlicesByNorm(
      self, values, indices, shape, max_norm, axes
  ):
      values = constant_op.constant(values)
      indices = constant_op.constant(indices)
      shape = constant_op.constant(shape)
      # IndexedSlices mode
      indexed_slices = indexed_slices_lib.IndexedSlices(
          values, indices, shape
      )
      clipped = clip_ops.clip_by_norm(indexed_slices, max_norm, axes)
      # clipped should be IndexedSlices
      self.assertIsInstance(clipped, indexed_slices_lib.IndexedSlices)
      clipped = ops.convert_to_tensor(clipped)
  
      # Tensor mode
      dense_tensor = ops.convert_to_tensor(indexed_slices)
      dense_clipped = clip_ops.clip_by_norm(
          dense_tensor, max_norm, axes
      )
      result, expected = self.evaluate([clipped, dense_clipped])
      self.assertAllClose(result, expected)
  
imports: import numpy
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import indexed_slices
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import test_util
  from tensorflow.python.ops import clip_ops
  from tensorflow.python.ops import numerics
  from tensorflow.python.platform import test
label_desc: Use image node_id 5 for calling the ClipOpsTest obj's underlying member method code with example usage: obj._testClipIndexedSlicesByNorm(values, indices, shape, max_norm, axes) without return types