code: def testGatherRaiseSparse(self, strategy, pure_eager):
      dense_shape = [5, 2]
      t0 = _make_indexed_slices(
          values=[[1.0, 2.0]], indices=[2], dense_shape=dense_shape
      )
  
      def run(value):
          return strategy.gather(value, axis=0)
  
      with self.assertRaisesRegex(
          NotImplementedError, r"gather does not support IndexedSlices"
      ):
          if pure_eager:
              run(t0)
          else:
              def_function.function(run)(t0)
  
imports: from absl.testing import parameterized
  from tensorflow.python.data.ops import dataset_ops
  from tensorflow.python.distribute import central_storage_strategy
  from tensorflow.python.distribute import combinations
  from tensorflow.python.distribute import distribute_lib
  from tensorflow.python.distribute import mirrored_strategy
  from tensorflow.python.distribute import strategy_combinations
  from tensorflow.python.distribute import test_util
  from tensorflow.python.distribute import tpu_strategy
  from tensorflow.python.distribute.collective_all_reduce_strategy import CollectiveAllReduceStrategy
  from tensorflow.python.eager import def_function
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import errors
  from tensorflow.python.framework import indexed_slices
  from tensorflow.python.framework import test_util
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import gradients_impl
  from tensorflow.python.platform import test
  from tensorflow.python.util import nest
label_desc: Use image node_id 11 for calling the GatherTest obj's underlying member method code with example usage: obj.testGatherRaiseSparse(strategy, pure_eager) and returns: strategy