code: def test_builder_to_backend_programmatic(
      self, use_cpu_only, backend, rankData_rankIndices, accumulate_mode
  ):
      data_rank, indices_rank = rankData_rankIndices
      data_shape = np.random.randint(low=2, high=5, size=data_rank)
      indices_shape = np.random.randint(
          low=2, high=5, size=indices_rank
      )
      updates_shape = list(indices_shape) + list(data_shape[1:])
  
      data = np.random.rand(*data_shape).astype(np.float32)
      updates = np.random.rand(*updates_shape).astype(np.float32)
      indices = np.random.randint(
          0, data_shape[0], size=indices_shape
      ).astype(np.int32)
  
      def build(data, indices, updates):
          return mb.scatter(
              data=data,
              indices=indices,
              updates=updates,
              mode=accumulate_mode,
          )
  
      with tf.Graph().as_default(), tf.Session() as sess:
          tf_output = tf.Variable(data)
          sess.run(tf.global_variables_initializer())
          if accumulate_mode == "update":
              sess.run(tf.scatter_update(tf_output, indices, updates))
          if accumulate_mode == "add":
              sess.run(tf.scatter_add(tf_output, indices, updates))
          if accumulate_mode == "sub":
              sess.run(tf.scatter_sub(tf_output, indices, updates))
          if accumulate_mode == "mul":
              sess.run(tf.scatter_mul(tf_output, indices, updates))
          if accumulate_mode == "div":
              sess.run(tf.scatter_div(tf_output, indices, updates))
          if accumulate_mode == "max":
              sess.run(tf.scatter_max(tf_output, indices, updates))
          if accumulate_mode == "min":
              sess.run(tf.scatter_min(tf_output, indices, updates))
          expected_output = sess.run(tf_output)
  
      input_placeholders = {
          "data": mb.placeholder(shape=data.shape),
          "indices": mb.placeholder(
              shape=indices.shape, dtype=types.int32
          ),
          "updates": mb.placeholder(shape=updates.shape),
      }
  
      input_values = {
          "data": data,
          "indices": indices,
          "updates": updates,
      }
  
      expected_output_types = tuple(data_shape[:]) + (types.fp32,)
      run_compare_builder(
          build,
          input_placeholders,
          input_values,
          expected_output_types,
          expected_output,
          use_cpu_only=use_cpu_only,
          frontend_only=False,
          backend=backend,
      )
  
imports: from coremltools.converters.mil import testing_reqs
  from coremltools.converters.mil.testing_reqs import *
  from .testing_utils import run_compare_builder
label_desc: Use image node_id 2 for calling the TestScatter obj's underlying member method code with example usage: obj.test_builder_to_backend_programmatic(use_cpu_only, backend, rankData_rankIndices, accumulate_mode) and returns: mb