code: def _ragged_tensor_scatter_nd_update(params, indices, updates):
      """Version of tensor_scatter_nd_update() where the values are ragged."""
      # Create a RT in the shape of `params` and containing the "global" positions.
      # Here "global" means the element position in the flat values Tensor.
      global_positions_flat = math_ops.range(
          array_ops.size(params.flat_values)
      )
      global_positions = params.with_flat_values(global_positions_flat)
  
      global_indices = array_ops.batch_gather(global_positions, indices)
      update_indices = global_indices.flat_values
      update_indices = array_ops.expand_dims(update_indices, -1)
      update_indices = math_ops.cast(update_indices, params.dtype)
      params_flat = params.flat_values
      update_values = math_ops.cast(
          updates.flat_values, params_flat.dtype
      )
      results_flat = array_ops.tensor_scatter_update(
          params_flat, update_indices, update_values
      )
      return params.with_flat_values(results_flat)
  
imports: from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import ops
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import control_flow_assert
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops import random_ops
  from tensorflow.python.ops.ragged import ragged_array_ops
  from tensorflow.python.ops.ragged import ragged_math_ops
  from tensorflow.python.ops.ragged import ragged_tensor
  from tensorflow.python.ops.ragged import ragged_where_op
  from tensorflow_text.python.ops import item_selector_ops
label_desc: Use image node_id 1 for calling a global function with example usage: _ragged_tensor_scatter_nd_update(params, indices, updates) and returns: params