code: def _range_coding_offsets(num_noise_levels, prior_shape, dtype):
      """Computes the prior offsets for building range coding tables."""
      offset_indexes = tf.range(num_noise_levels, dtype=dtype)
      offset_indexes = tf.reshape(
          offset_indexes, [-1] + [1] * prior_shape.rank
      )
      offset = _offset_indexes_to_offset(
          offset_indexes, num_noise_levels, dtype
      )
      return offset
  
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 4 for calling a global function with example usage: _range_coding_offsets(num_noise_levels, prior_shape, dtype) and returns: offset