code: def _testTypes(self, vals):
      for dtype in [
          np.float32,
          np.float64,
          np.int32,
          np.int64,
          dtypes.bfloat16.as_numpy_dtype,
      ]:
          x = np.zeros(vals.shape).astype(dtype)
          y = vals.astype(dtype)
          var_value, op_value = self._initAssignFetch(
              x, y, use_gpu=False
          )
          self.assertAllEqual(y, var_value)
          self.assertAllEqual(y, op_value)
          var_value, op_value = self._initAssignAddFetch(
              x, y, use_gpu=False
          )
          self.assertAllEqual(x + y, var_value)
          self.assertAllEqual(x + y, op_value)
          var_value, op_value = self._initAssignSubFetch(
              x, y, use_gpu=False
          )
          self.assertAllEqual(x - y, var_value)
          self.assertAllEqual(x - y, op_value)
          if test.is_built_with_gpu_support() and dtype in [
              np.float32,
              np.float64,
          ]:
              var_value, op_value = self._initAssignFetch(
                  x, y, use_gpu=True
              )
              self.assertAllEqual(y, var_value)
              self.assertAllEqual(y, op_value)
              var_value, op_value = self._initAssignAddFetch(
                  x, y, use_gpu=True
              )
              self.assertAllEqual(x + y, var_value)
              self.assertAllEqual(x + y, op_value)
              var_value, op_value = self._initAssignSubFetch(
                  x, y, use_gpu=True
              )
              self.assertAllEqual(x - y, var_value)
              self.assertAllEqual(x - y, op_value)
  
file_path: tensorflow-upstream/tensorflow/python/kernel_tests/variables/dense_update_ops_test.py
imports: import numpy
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import test_util
  from tensorflow.python.ops import state_ops
  from tensorflow.python.ops import variables
  from tensorflow.python.platform import test
label_desc: Use image node_id 4 for calling the AssignOpTest obj's underlying member method code with example usage: obj._testTypes(vals) without return types