code: def testScatter(self):
      test_array = np.arange(9).astype(np.int32).reshape((3, 3))
      scatter_indices = np.array([0, 2], dtype=np.int32)
      updates = np.array([[10, 20, 30], [70, 80, 90]], dtype=np.int32)
  
      dnums = xla_data_pb2.ScatterDimensionNumbers()
      dnums.update_window_dims.append(1)
      dnums.inserted_window_dims.append(0)
      dnums.scatter_dims_to_operand_dims.append(0)
      dnums.index_vector_dim = 1
  
      add_numbers = function.Defun(np.int32, np.int32)(
          lambda x, y: x + y
      )
  
      def test_fn(
          scatter_input,
          scatter_indices,
          scatter_updates,
      ):
          return gen_xla_ops.xla_scatter(
              scatter_input,
              scatter_indices,
              scatter_updates,
              add_numbers,
              dnums.SerializeToString(),
              indices_are_sorted=False,
          )
  
      expected = np.array(
          [[10, 21, 32], [3, 4, 5], [76, 87, 98]], dtype=np.int32
      )
      self._assertOpOutputMatchesExpected(
          test_fn,
          args=(test_array, scatter_indices, updates),
          expected=expected,
      )
  
imports: import functools
  from absl.testing import parameterized
  import numpy
  from tensorflow.compiler.tests import xla_test
  from tensorflow.compiler.tf2xla.ops import gen_xla_ops
  from tensorflow.compiler.tf2xla.python import xla
  from local_xla.xla import xla_data_pb2
  from tensorflow.python.eager import def_function
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import errors
  from tensorflow.python.framework import function
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import tensor_shape
  from tensorflow.python.framework import test_util
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import array_ops_stack
  from tensorflow.python.ops import random_ops_util
  from tensorflow.python.platform import googletest
label_desc: Use image node_id 20 for calling the XlaOpsNumericalTest obj's underlying member method code with example usage: obj.testScatter() and returns: gen_xla_ops