code: def testDenseUpdate(self):
      v = self.create_variable(1.0)
      self.assertEqual(
          v.assign(
              2.0, use_locking=True, name="assign", read_value=True
          ),
          2.0,
      )
      self.assertIsNone(v.assign(3.0, read_value=False))
      self.assertEqual(v, 3.0)
      self.assertEqual(
          v.assign_add(
              1.0, use_locking=True, name="assign_add", read_value=True
          ),
          4.0,
      )
      self.assertIsNone(v.assign_add(1.0, read_value=False))
      self.assertEqual(v, 5.0)
      self.assertEqual(
          v.assign_sub(
              1.0, use_locking=True, name="assign_sub", read_value=True
          ),
          4.0,
      )
      self.assertIsNone(v.assign_sub(1.0, read_value=False))
      self.assertEqual(v, 3.0)
  
      @def_function.function
      def f():
          self.assertIsInstance(
              v.assign(1.0, read_value=False), ops.Operation
          )
          self.assertIsInstance(
              v.assign_add(1.0, read_value=False), ops.Operation
          )
          self.assertIsInstance(
              v.assign_sub(1.0, read_value=False), ops.Operation
          )
  
      f()
  
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 13 for calling the _VariableInterfaceTestBase obj's underlying member method code with example usage: obj.testDenseUpdate() without return types