code: def _add_offset_indexes(indexes, num_noise_levels):
      """Adds offset indexes to `indexes`."""
      # This works as a shared source of randomness across CPU and GPU.
      shape = tf.shape(indexes)[:-1]
      offset_indexes = tf.random.stateless_uniform(
          shape,
          seed=(1234, 1234),
          minval=0,
          maxval=num_noise_levels,
          dtype=tf.int32,
      )
      offset_indexes = tf.cast(offset_indexes, indexes.dtype)
      return tf.concat((offset_indexes[..., None], indexes), axis=-1)
  
imports: import functools
  import tensorflow
  from tensorflow_compression.python.entropy_models import continuous_base
  from tensorflow_compression.python.ops import gen_ops
  from tensorflow_compression.python.ops import math_ops
label_desc: Use image node_id 1 for calling a global function with example usage: _add_offset_indexes(indexes, num_noise_levels) and returns: tf