code: def testSparseUpdate(self):
      v = self.create_variable([0.0, 0.0, 0.0])
      self.assertAllEqual(
          v.scatter_add(
              _make_index_slices(values=[1.0, 2.0], indices=[0, 2]),
              use_locking=True,
              name="add",
          ),
          [1.0, 0.0, 2.0],
      )
      self.assertAllEqual(
          v.scatter_div(
              _make_index_slices(values=[4.0, 2.0], indices=[0, 2]),
              use_locking=True,
              name="div",
          ),
          [0.25, 0.0, 1.0],
      )
      self.assertAllEqual(
          v.scatter_max(
              _make_index_slices(values=[1.0, 0.5], indices=[1, 2]),
              use_locking=True,
              name="max",
          ),
          [0.25, 1.0, 1.0],
      )
      self.assertAllEqual(
          v.scatter_min(
              _make_index_slices(values=[1.0, 0.5], indices=[0, 1]),
              use_locking=True,
              name="min",
          ),
          [0.25, 0.5, 1.0],
      )
      self.assertAllEqual(
          v.scatter_mul(
              _make_index_slices(values=[2.0, 0.5], indices=[0, 1]),
              use_locking=True,
              name="mul",
          ),
          [0.5, 0.25, 1.0],
      )
      self.assertAllEqual(
          v.scatter_sub(
              _make_index_slices(values=[2.0, 0.5], indices=[0, 1]),
              use_locking=True,
              name="sub",
          ),
          [-1.5, -0.25, 1.0],
      )
      self.assertAllEqual(
          v.scatter_update(
              _make_index_slices(values=[2.0, 0.5], indices=[0, 1]),
              use_locking=True,
              name="update",
          ),
          [2.0, 0.5, 1.0],
      )
      self.assertAllEqual(
          v.batch_scatter_update(
              _make_index_slices(values=[1.0, 1.5], indices=[0, 1]),
              use_locking=True,
              name="update",
          ),
          [1.0, 1.5, 1.0],
      )
  
imports: from absl.testing import parameterized
  from tensorflow.python.distribute import combinations
  from tensorflow.python.distribute import strategy_combinations
  from tensorflow.python.distribute import test_util
  from tensorflow.python.distribute import values_v2
  from tensorflow.python.eager import def_function
  from tensorflow.python.eager import test
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import indexed_slices
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import tensor
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import resource_variable_ops
  from tensorflow.python.ops import variables
label_desc: Use image node_id 14 for calling the _VariableInterfaceTestBase obj's underlying member method code with example usage: obj.testSparseUpdate() without return types